[K42-discussion] Fun with dispatchers...

Nathan Sweet nsweet at cs.unm.edu
Mon Nov 21 05:35:39 EST 2005


Hello,

I'm pretty new to K42 and I have a few questions about programming in 
K42.  Hopefully, someone can help me out a bit and point me in the right 
direction.

First, what is the status on the ability to use an alternate 
dispatcher?  I know this topic has come up several times in the past, 
but I was curious to know if anybody has been successful at doing this 
and, if so, what's the process for accomplishing that task?

Second, I'd like to have my dispatcher do something a little different 
when creating threads, but it is, apparently, necessary to call the 
scheduleFunction() methods in the Scheduler, which then makes a call to 
the scheduleFunction() methods in the dispatcher.  What I want, for 
example, is to have the thread management code (e.g., the SimpleThread 
class) to make calls directly to the dispatcher to create threads, 
instead of going through the Scheduler, so I wouldn't have to modify the 
Scheduler class (my scheduleFunction() method takes a different set of 
parameters).  What would be the best way to do this?  Declare my new 
scheduleFunction() method as public instead of protected?  Declare 
SimpleThread a friend class in the dispatcher?  Or something else?

Thanks in advance for any insight you can give.

Cheers,
Nathan




More information about the K42-discussion mailing list