Version 8 of notifier

Updated 2006-05-22 10:00:53

...

"The interaction between the I/O subsystem and the notifier" [L1 ]


DKF (trying to improve the information available):

Tcl's notifier is the real core of how the event loop works. What it does is provide a bridge from the world of events that the OS can wait for to notifications that the rest of the event loop core uses to present the (apparently) simple callbacks it delivers.

To understand wht it is doing, let us start by considering the simple case: an unthreaded system with one channel on Unix with one readable fileevent set upon it and no timer events. In this case, the notifier will basically just call select() with the only "interesting" file descriptor in the readable and exception sets being the FD that backs up the channel. The OS will then wait until either the FD has an error or becomes readable, when the select() call will return and the notifier will deliver that fact back up to the higher levels of the core. Even if a (non-fatal) signal turns up, it is handled here (usually by restarting the select(), though that's not the only way).

So far, so good.

Where things get more complex is when you're either on non-Unix platforms, or when you've got threads-on-Unix involved. To cut a long story short, those cases are very tricky because there are lots of special cases that have to be right or the notifier deadlocks unpredictably.

[more detail needed]


EF notifier is also the name of a new Tk library that I have just made available [L2 ]. Maybe the name was badly chosen... notifier is a very raw package, you might want to use osd instead. osd will give you the ability to specify the content of the notification.

floatingbbar is another library written on top of the notifier. It provides button bars that pop up from one side of the screen when the mouse hoovers over them.

 Where: http://www.sics.se/~emmanuel/?Code:notifier
 Description: The notifier library implements a new Tcl/Tk widget that presents itself
              as an (animated) notifier that pops up from one of the side of the screen
              in a direction that can be chosen. The notifier is a new toplevel and it
              is up to the caller to fill it in with content.
 Updated: 05/2006
 Contact: Emmanuel Frecon, see web site

Category Widget | Category Package