Overview
| Artifact ID: | d58affa65ff32ab6d43d0abcaeb92dccad0105fa |
|---|---|
| Ticket: | 1202052fffffffffffffffffffffffffffffffff
Darwin: CFRunLoop based notifier |
| User & Date: | das on 2005-05-14 18:28:19 |
Changes
- assignee changed to: "das"
- cmimetype changed to: "text/plain"
- comment changed to:
This patch implements a new CFRunLoop based notifier on Darwin to allow easy integration with other event loops on Mac OS X, in particular the TkAqua Carbon event loop can now be integrated via a standard tcl event source (instead of TkAqua upon loading having to finalize the exsting notifier and replace it with its custom version, which has bad consequences for any fileevent handlers already established). The new tclMacOSXNotify.c is very similar to the threaded tclUnixNotfy.c, except that the notifier thread uses a CFRunLoopSource to wake up tcl threads waiting for events in CFRunLoopRun. To allow use of this notifier in an untreaded core, we use pthread API directly and don't rely on tcl thread API. To reduce complexity only the minimal amount of pthread API necessary is used; for locking, we use the low overhead OSSpinLockLock API (or the commpage _spin_lock SPI). The need for condition variables is removed by creating the trigger pipe from the main thread and using pthread_join to wait for notifier thread termination. Use of the tcl thread specific data API can remain because it is only used in threads with interps (i.e. not the notifier thread) and in the unthreaded case, there is only one such thread.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "das"
- subsystem changed to: "01. Notifier"
- title changed to: "Darwin: CFRunLoop based notifier"
- type changed to: "Patch"