Memchan


 

Event generation

SourceForge Logo

Memchan Logo

Tcl Logo

 Crossreferences

Memchan SF Project

Homepage
Releases
Logos
Animations
Documentation
ChangeLog
© Disclaimer
Event generation


Manpages

fifo
fifo2
memchan
null
random
  This page contains internal documentation and thoughts regarding the generation of file events for memory based channels.

The current scheme is to use periodic timers with a small delay greater than zero.

While thinking about the implementation of fifo2 the following idea came up: Queue a pseudo-file event, wait for it to wander to the front of the event queue and queue the next pseudo-file event for the channel during the dispatch and execution of the first event.

This idea was shot down after a deeper investigation of the way file events are generated and handled by the tcl core. See the Interaction of I/O system and notifier in the Tcl core for a writeup of the results of this investigation. For this package the essential result of this investigation is that the new scheme would starve all other event sources as the notifier would never again call Tcl_WaitForEvent to wait for external events. Especially if the user happens to activate an event handler for writable events on a memory channel.

It seems that the current solution is the best we can do, well except for setting the delay on the timers to zero. This will allow other events (sources) to squeeze in while reducing delay (and thus the impact on their transfer performance) for memory channels to the minimum. Creating and registering a completely new event source would be possible too but has the disadvantage of difficult cross-version support as the internal interfaces to the notifier changed several times.

The only type of memory channel which can be further optimized is fifo2 because both sides can generate and queue events for the other side whenever data is written into the appropriate memory buffers.


Last updated @ Fri Mar 18 11:28:03 PST 2005
Memchan 2.2.1 released   patthoyts - 2004-12-03 05:55
Manpages now available   andreas_kupries - 2001-09-06 23:27
Memchan CVS   andreas_kupries - 2001-08-28 08:58
Tracker Tracker

 - Bugs ( 3 open / 13 total )
Bug Tracking System

 - Support Requests ( 0 open / 1 total )
Tech Support Tracking System

 - Patches ( 0 open / 4 total )
Patch Tracking System

 - Feature Requests ( 5 open / 9 total )
Feature Request Tracking System


Docs Doc Manager
Mail Lists Mailing Lists ( 2 mailing lists )
Screenshots Screenshots
Tasks Task Manager
  - Documentation
  - Website
  - Memchan Dev
CVS CVS Tree ( 187 commits, 70 adds ) known bug
FTP Released Files

©Andreas Kupries
Last update at Fri Mar 18 11:28:06 PST 2005