Skip to content

Instantly share code, notes, and snippets.

@prologic
Created October 29, 2014 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/a95ee4367d709e02b3e4 to your computer and use it in GitHub Desktop.
Save prologic/a95ee4367d709e02b3e4 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
(circuits)
prologic@daisy
Wed Oct 29 17:54:07
~/circuits
$ python
Python 2.7.8 (default, Sep 17 2014, 18:01:50)
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from circuits import Manager, Debugger, Event
>>> m = Manager() + Debugger()
>>> m.start()
(<Thread(Manager, started daemon 139752131626752)>, None)
<registered[*] (<Debugger/* 3368:Manager (queued=0) [S]>, <Manager/ 3368:Manager (queued=2) [R]> )>
>>> <started[*] (<Manager/ 3368:Manager (queued=1) [R]> )>
>>> m.fire(Event.create("foo"))
<Value () result: False errors: False for <foo[*] ( )>
>>> <foo[*] ( )>
>>> m
<Manager/ 3368:MainThread (queued=0) [R]>
>>> from threading import enumerate
>>> list(enumerate())
[<_MainThread(MainThread, started 139752217548544)>, <Thread(Manager, started daemon 139752131626752)>]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment