[Mono-osx] #define and Operating System Specific Code
Andrew Ayre
andy at britishideas.com
Fri Oct 14 07:15:55 EDT 2011
Following on from my previous question are there any suggestions on how
to write cross-platform code that uses threads? Currently I have:
Thread SerialThread = new Thread(new ThreadStart(SerialHandler));
...
SerialThread.Start();
private void SerialHandler()
{
NSAutoreleasePool Pool = new NSAutoreleasePool();
...
Pool.Dispose();
Pool = null;
}
For Windows and Linux I want to omit the autorelease pool code. I'm sure
there must be a clever way that doesn't involve #if/#endif.
thanks, Andy
On 10/12/2011 3:52 PM, Andrew Ayre wrote:
> Hi, where can I find a list of compiler defines that Mono provides to
> identify the current operating system?
>
> Thanks, Andy
>
--
Andy
PGP Key ID: 0xDC1B5864
More information about the Mono-osx
mailing list