IRC Logs for #circuits Wednesday, 2014-10-29

*** Osso has quit IRC03:21
*** Osso has joined #circuits03:30
*** Osso has quit IRC03:53
robert_prologic: so here's an interesting "bug"; when I try to fire an event from a separate thread, it stops the thread.07:37
prologicyou shouldn't really do that07:42
prologicwe've gone to great lengths to make circuits as thread safe as possible07:42
prologicbut that's only been useful for testing purposes07:43
prologicin practice you should not be using multi-threading really at all07:43
prologicrobert_, and actually what you're describing just isn't true07:52
prologicotherwise our whole unit test suite would fail miserably07:52
prologicas well as circuits would not work from the repl07:52
robert_well I'm trying to get the filesystem monitoring to dispatch events to the rest of the application07:53
robert_I'm probably doing it wrong. :p07:53
prologicmost definately :)07:54
prologicbut what I said above still holds07:54
prologicDON'T mix event-driven (ala circuits) and multi-threading07:54
prologicyou will end up with a world of pain :)07:54
prologicuse circuits event-driven architecture and builtin coroutine control flows07:54
robert_I noticed. :p07:57
robert_so I'm guessing Circuits' file monitoring is still broken on freebsd, right?07:58
prologicnot broken08:14
prologicnot implemented08:14
prologicapparently file "watching" on BSD is done through KQueue08:14
prologiccircuits has a kqueue poller for *BSD08:15
prologicbut tbh I have no idea how the file "watching" side of kqueue works at all08:15
prologicso someone would have to code up a BSD equivilent of our component08:15
prologicfeel free to try and send us a PR :)08:15
robert_yeah, it's done with kqueue(3)08:29
robert_watchdog has an implementation (I think) of how it works08:30
robert_oh, you just use pyinotify.08:57
robert_prologic: so I could indeed just wrap watcher?09:00
prologicbuild us a BSD INotify for circuits :)09:33
prologicwe do for LInux - yes09:33
prologicyou'd have to build a similar API/Interface for BSD09:34
prologicso you can still do:09:34
prologicand I think the API is basically09:34
prologic |  add_path(self, path, mask=None, recursive=False)09:36
prologic |09:36
prologic |  remove_path(self, path, recursive=False)09:36
prologichere we go09:40
prologicwrite a INotify Component for this :)09:40
robert_what do I have to do?11:09
robert_(what parts need replacing?)11:10
robert_prologic: where should I look first?11:10
prologicgood question11:49
prologichave a look at circuits/io/notify.py11:49
prologicas a start11:49
robert_so is the whole thing in circuits/io/ ?11:59
prologicit's a wrapper around pyinotify12:00
robert_so, _wm is the notification engine?12:22
robert_prologic: ^ so, _wm is the thing that does the watching?12:52
robert_prologic: so when I 'yield' in my filesystem code, my code tends not to execute.15:32
*** saint-ron has quit IRC15:38
*** saint-ron has joined #circuits15:40
*** saint-ron has quit IRC15:45
*** saint-ron has joined #circuits15:47
*** saint-ron has quit IRC15:53
*** saint-ron has joined #circuits16:09
*** saint-ron has quit IRC17:17
*** rons_ has joined #circuits17:18
*** saint-ron has joined #circuits17:25
*** rons_ has quit IRC17:26
*** DuaneTrain has joined #circuits17:57
*** DuaneTrain has left #circuits ()17:59
prologicrobert_, I don't understand :/20:37

Generated by 2.11.0 by Marius Gedminas - find it at!