1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 07:13:24 +03:00

Make QOS of queues customizable

This commit is contained in:
Tae Won Ha 2020-09-18 10:57:35 +02:00
parent e6186544a2
commit 3eb6fa1486
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
4 changed files with 9 additions and 9 deletions

View File

@ -329,8 +329,8 @@ class UiBridge {
private let nvimArgs: [String] private let nvimArgs: [String]
private let envDict: [String: String] private let envDict: [String: String]
private let server = RxMessagePortServer() private let server = RxMessagePortServer(queueQos: .userInteractive)
private let client = RxMessagePortClient() private let client = RxMessagePortClient(queueQos: .userInteractive)
private var nvimServerProc: Process? private var nvimServerProc: Process?

View File

@ -42,10 +42,10 @@ public final class RxMessagePortClient {
public let uuid = UUID() public let uuid = UUID()
public var timeout = RxMessagePortClient.defaultTimeout public var timeout = RxMessagePortClient.defaultTimeout
public init() { public init(queueQos: DispatchQoS) {
self.queue = DispatchQueue( self.queue = DispatchQueue(
label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)", label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)",
qos: .userInitiated qos: queueQos
) )
} }
@ -155,10 +155,10 @@ public final class RxMessagePortServer {
public var stream: Observable<Message> { self.streamSubject.asObservable() } public var stream: Observable<Message> { self.streamSubject.asObservable() }
public init() { public init(queueQos: DispatchQoS) {
self.queue = DispatchQueue( self.queue = DispatchQueue(
label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)", label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)",
qos: .userInitiated qos: queueQos
) )
self.messageHandler = MessageHandler(subject: self.streamSubject) self.messageHandler = MessageHandler(subject: self.streamSubject)
} }

View File

@ -55,10 +55,10 @@ public final class RxMsgpackRpc {
public let uuid = UUID() public let uuid = UUID()
public init() { public init(queueQos: DispatchQoS) {
self.queue = DispatchQueue( self.queue = DispatchQueue(
label: "\(String(reflecting: RxMsgpackRpc.self))-\(self.uuid.uuidString)", label: "\(String(reflecting: RxMsgpackRpc.self))-\(self.uuid.uuidString)",
qos: .userInitiated qos: queueQos
) )
} }

View File

@ -81,5 +81,5 @@ public final class RxNeovimApi {
public init() {} public init() {}
private let msgpackRpc = RxMsgpackRpc() private let msgpackRpc = RxMsgpackRpc(queueQos: .userInitiated)
} }