mirror of
https://github.com/qvacua/vimr.git
synced 2024-09-11 17:15:34 +03:00
Remove unnec' completable
This commit is contained in:
parent
f6f41b1b92
commit
c663815d63
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4B0225EF224AAE260052362B"
|
||||
BuildableName = "MinimalNvimViewDemo.app"
|
||||
BlueprintName = "MinimalNvimViewDemo"
|
||||
ReferencedContainer = "container:NvimViewSupport.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4B0225EF224AAE260052362B"
|
||||
BuildableName = "MinimalNvimViewDemo.app"
|
||||
BlueprintName = "MinimalNvimViewDemo"
|
||||
ReferencedContainer = "container:NvimViewSupport.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4B0225EF224AAE260052362B"
|
||||
BuildableName = "MinimalNvimViewDemo.app"
|
||||
BlueprintName = "MinimalNvimViewDemo"
|
||||
ReferencedContainer = "container:NvimViewSupport.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -73,30 +73,16 @@ public final class RxMsgpackRpc {
|
||||
)
|
||||
}
|
||||
|
||||
public func run(inPipe: Pipe, outPipe: Pipe, errorPipe: Pipe) -> Completable {
|
||||
public func run(inPipe: Pipe, outPipe: Pipe, errorPipe: Pipe) {
|
||||
self.inPipe = inPipe
|
||||
self.outPipe = outPipe
|
||||
self.errorPipe = errorPipe
|
||||
|
||||
return Completable.create { completable in
|
||||
self.queue.async { [weak self] in
|
||||
self?.startReading()
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
self.queue.async { [weak self] in self?.startReading() }
|
||||
}
|
||||
|
||||
public func stop() -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async { [weak self] in
|
||||
self?.cleanUp()
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
public func stop() {
|
||||
self.queue.async { [weak self] in self?.cleanUp() }
|
||||
}
|
||||
|
||||
public func response(msgid: UInt32, error: Value, result: Value) -> Completable {
|
||||
@ -337,7 +323,7 @@ public final class RxMsgpackRpc {
|
||||
if let single = self.singles.removeValue(forKey: msgid) {
|
||||
single(.success(Response(msgid: msgid, error: error, result: result)))
|
||||
}
|
||||
|
||||
|
||||
if self.streamResponses {
|
||||
self.streamSubject.onNext(.response(msgid: msgid, error: error, result: result))
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class RxMsgpackRpcNeovimExample: XCTestCase {
|
||||
let outPipe = self.proc.standardOutput as! Pipe
|
||||
let errorPipe = self.proc.standardError as! Pipe
|
||||
try! self.proc.run()
|
||||
try! self.rpc.run(inPipe: inPipe, outPipe: outPipe, errorPipe: errorPipe).waitCompletion()
|
||||
self.rpc.run(inPipe: inPipe, outPipe: outPipe, errorPipe: errorPipe)
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
@ -62,7 +62,7 @@ class RxMsgpackRpcNeovimExample: XCTestCase {
|
||||
expectsReturnValue: false
|
||||
).waitCompletion()
|
||||
|
||||
try! self.rpc.stop().waitCompletion()
|
||||
self.rpc.stop()
|
||||
self.proc.waitUntilExit()
|
||||
}
|
||||
|
||||
|
77
VimR/VimR.xcodeproj/xcshareddata/xcschemes/VimR.xcscheme
Normal file
77
VimR/VimR.xcodeproj/xcshareddata/xcschemes/VimR.xcscheme
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4BEBA5041CFF374B00673FDF"
|
||||
BuildableName = "VimR.app"
|
||||
BlueprintName = "VimR"
|
||||
ReferencedContainer = "container:VimR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4BEBA5041CFF374B00673FDF"
|
||||
BuildableName = "VimR.app"
|
||||
BlueprintName = "VimR"
|
||||
ReferencedContainer = "container:VimR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4BEBA5041CFF374B00673FDF"
|
||||
BuildableName = "VimR.app"
|
||||
BlueprintName = "VimR"
|
||||
ReferencedContainer = "container:VimR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
Loading…
Reference in New Issue
Block a user