gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Bluetooth on OS X


From: Siegfried Schloissnig
Subject: RE: Bluetooth on OS X
Date: Wed, 25 Jun 2003 21:00:45 +0200

Hi,
 
> Thanks. I looked through the code. What is the reason for using threads?
> Cant we avoid it?

  You may have noticed the call to CFRunLoopRun() at the end of thread_main.
The CFRunLoop is responsible for dispatching the messages (interrupts) the
OS receives from the hardware to the registered callbacks. This means that
in our case the data listener for incoming bluetooth messages gets called.
Since the CFRunLoop never returns you have to decouple it into a separate
thread.

  If try hard you could get rid of the thread, but it would involve large
changes to other parts of gnokii. 


cheers,
  Siegfried








reply via email to

[Prev in Thread] Current Thread [Next in Thread]