mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 23:02:35 +03:00
Make QOS of queues customizable
This commit is contained in:
parent
e6186544a2
commit
3eb6fa1486
@ -329,8 +329,8 @@ class UiBridge {
|
||||
private let nvimArgs: [String]
|
||||
private let envDict: [String: String]
|
||||
|
||||
private let server = RxMessagePortServer()
|
||||
private let client = RxMessagePortClient()
|
||||
private let server = RxMessagePortServer(queueQos: .userInteractive)
|
||||
private let client = RxMessagePortClient(queueQos: .userInteractive)
|
||||
|
||||
private var nvimServerProc: Process?
|
||||
|
||||
|
@ -42,10 +42,10 @@ public final class RxMessagePortClient {
|
||||
public let uuid = UUID()
|
||||
public var timeout = RxMessagePortClient.defaultTimeout
|
||||
|
||||
public init() {
|
||||
public init(queueQos: DispatchQoS) {
|
||||
self.queue = DispatchQueue(
|
||||
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 init() {
|
||||
public init(queueQos: DispatchQoS) {
|
||||
self.queue = DispatchQueue(
|
||||
label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)",
|
||||
qos: .userInitiated
|
||||
qos: queueQos
|
||||
)
|
||||
self.messageHandler = MessageHandler(subject: self.streamSubject)
|
||||
}
|
||||
|
@ -55,10 +55,10 @@ public final class RxMsgpackRpc {
|
||||
|
||||
public let uuid = UUID()
|
||||
|
||||
public init() {
|
||||
public init(queueQos: DispatchQoS) {
|
||||
self.queue = DispatchQueue(
|
||||
label: "\(String(reflecting: RxMsgpackRpc.self))-\(self.uuid.uuidString)",
|
||||
qos: .userInitiated
|
||||
qos: queueQos
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -81,5 +81,5 @@ public final class RxNeovimApi {
|
||||
|
||||
public init() {}
|
||||
|
||||
private let msgpackRpc = RxMsgpackRpc()
|
||||
private let msgpackRpc = RxMsgpackRpc(queueQos: .userInitiated)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user