Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-05-15
03:43 • Closed ticket [1202052fff]: Darwin: CFRunLoop based notifier plus 3 other ch... artifact: 303e7eee1c user: das
03:42 • Ticket [1202052fff]: 4 changes artifact: f0d2eacc7e user: das
03:42 • Add attachment tk-CFNotifier-core-8-4-branch.diff to ticket [1202052fff... artifact: 61812070c3 user: das
03:42 • Ticket [1202052fff] Darwin: CFRunLoop based notifier status still Open with ... artifact: 605b425904 user: das
03:42 • Add attachment tcl-CFNotifier-core-8-4-branch.diff to ticket [1202052ff... artifact: 2b7ff86306 user: das
03:41 • Ticket [1202052fff] Darwin: CFRunLoop based notifier status still Open with ... artifact: 628f7da01e user: das
03:41 • Add attachment tk-CFNotifier-HEAD.diff to ticket [1202052fffffffff|1202... artifact: b949364aaa user: das
03:41 • Add attachment tcl-CFNotifier-HEAD.diff to ticket [1202052fffffffff|120... artifact: e0515cb49a user: das
03:41 • Ticket [1202052fff] Darwin: CFRunLoop based notifier status still Open with ... artifact: d624d4e39e user: das
2005-05-14
18:28 • New ticket [1202052fff]. artifact: d58affa65f user: das

Darwin: CFRunLoop based notifier

Closed / Fixed1202052fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2005-05-14 18:28:19
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.
dasplain2005-05-15 03:41:00
File Added - 134486: tcl-CFNotifier-HEAD.diff

Logged In: YES 
user_id=90580

committed to HEAD and core-8-4-branch.
dasplain2005-05-15 03:41:39
File Added - 134487: tk-CFNotifier-HEAD.diff
dasplain2005-05-15 03:42:18
File Added - 134488: tcl-CFNotifier-core-8-4-branch.diff
dasplain2005-05-15 03:42:59
File Added - 134489: tk-CFNotifier-core-8-4-branch.diff
das Closed ticket [1202052fff]. [History diff]2005-05-15 03:43:18
Log in (anonymous is fine) to add a comment.

Attachments: