mirror of
https://github.com/janet-lang/janet
synced 2025-01-20 20:26:51 +00:00
Add unlisten for linux.
This commit is contained in:
parent
33f55dc32f
commit
e53d22fad2
@ -257,6 +257,12 @@ static void janet_watcher_listen(JanetWatcher *watcher) {
|
|||||||
janet_async_start_fiber(fiber, watcher->stream, JANET_ASYNC_LISTEN_READ, watcher_callback_read, watcher);
|
janet_async_start_fiber(fiber, watcher->stream, JANET_ASYNC_LISTEN_READ, watcher_callback_read, watcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void janet_watcher_unlisten(JanetWatcher *watcher) {
|
||||||
|
if (!watcher->is_watching) return;
|
||||||
|
watcher->is_watching = 0;
|
||||||
|
janet_stream_close(watcher->stream);
|
||||||
|
}
|
||||||
|
|
||||||
#elif JANET_WINDOWS
|
#elif JANET_WINDOWS
|
||||||
|
|
||||||
#define WATCHFLAG_RECURSIVE 0x100000u
|
#define WATCHFLAG_RECURSIVE 0x100000u
|
||||||
|
Loading…
Reference in New Issue
Block a user