Re: Using (or not using) sigc::mem_fun with the G_CALLBACK macro



On Thu, 2005-06-16 at 07:22 -0500, Bob Caryl wrote:
> I had originally intended to write my help display routine as part of a 
> dynamic library intended for use by my applications.  If I use a global 
> function in this setting it would be entirely possible that multiple 
> applications and/or threads in the same application could try to call 
> such a global function simultaneously (or nearly simultaneously), 
> thereby giving indeterminate results.

Why would a global function be less thread safe than a member function?
As long as you're not using any global or static function variables
(which you also could do in a member function) I don't see how there is
a difference.

-- 
Lars Luthman
PGP key:     http://www.d.kth.se/~d00-llu/pgp_key.php
Fingerprint: FCA7 C790 19B9 322D EB7A  E1B3 4371 4650 04C7 7E2E

Attachment: signature.asc
Description: This is a digitally signed message part



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