discuss-gnustep
[Top][All Lists]
Advanced

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

Re: A question about Objective C running without any Frameworks


From: David Chisnall
Subject: Re: A question about Objective C running without any Frameworks
Date: Fri, 28 Aug 2009 23:55:20 +0100

On 28 Aug 2009, at 23:38, Michael Durket wrote:

Does anyone here know if an Objective C program, written to only link with libobjc and no other Objective C frameworks (so that the programs can only use whatever objects reside in libobjc like Object I presume) will operate correctly in a multi-threaded environment? Put another way, can Objective C using only libobjc work everywhere C can - i.e. as an Apache module, or a device driver (assuming proper interface code),
or as system code?

Yes, libobjc is reentrant. Very few bits of libobjc need to be thread safe in general use (message lookup does, for example, but that's a simple sparse array lookup). The rest is protected by mutexes. As long as you don't use any low-level runtime functions without reading the documentation about which mutex you need to acquire, it will all work.

David




reply via email to

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