Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncipc doesn't work on macos #10

Open
yglukhov opened this issue Apr 14, 2018 · 2 comments
Open

asyncipc doesn't work on macos #10

yglukhov opened this issue Apr 14, 2018 · 2 comments

Comments

@yglukhov
Copy link

import asynctools/asyncipc
let ipc = createIpc("blablabla")
let writeHandle = open("blablabla", sideWriter)
test.nim(3)              test
asyncipc.nim(476)        open
oserr.nim(110)           raiseOSError
Error: unhandled exception: Device not configured [OSError]
@yglukhov
Copy link
Author

yglukhov commented Apr 14, 2018

EDIT: Removed erroneous statement.

@yglukhov
Copy link
Author

Ok, now I understand this is happening because that's how fifos work. However, is there any recommended way to sync the connection of 2 processes? Basically, my use-case is the following

# Parent process
import asynctools/asyncipc
let ipc = createIpc("blablabla")
spawnChildProcess()
let writeHandle = open("blablabla", sideWriter)
# Child process
let readHandle = open("blablabla", sideReader)

writeHandle can not be opened before the child process opens readHandle. How can I wait for the child process to open it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant