ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-mac
tcl-mac
Re: [MACTCL] Threads & callbacks...
by Zoran Vasiljevic other posts by this author
Jan 24 2006 12:25AM messages near this date
[MACTCL] Threads & callbacks... | Re: [MACTCL] Threads & callbacks...
Am 23.01.2006 um 16:36 schrieb Mats Bengtsson:

>  Then I just discovered that those callbacks are on "Thread 5"
>  while the main Tcl interpreter lives on "Thread 1".
>  Since this is my first experience with this, how do I "move"
>  those callbacks to the Tcl interpreters thread, and what is actually
>  happening in a situation just described. Any ideas.

Generally, you can't assign a callback to be executed
in any other thread then your current thread. You can
however send a script to be run in some other thread
either synchronously or asynchronously by using the
thread::send command of the Tcl threading extension
(a part of the Tcl project on SF).

If you want to do all this from the C-level, then
you might want to get yourself acquainted with
Tcl event loop processing and most specifically the
Tcl_ThreadAlert API call.

I do not know if this helps...

Cheers
Zoran


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Tcl-mac mailing list
Tcl-mac@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
Thread:
Mats Bengtsson
Zoran Vasiljevic
Mats Bengtsson
Zoran Vasiljevic

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved