Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for windows)

2003-09-25 Thread Keith Bottner
Typically variables that you want to be per-thread are stored in what Microsoft calls Thread Local Storage (TLS). Variables that you want shared you can just treat as globals and statics with the appropriate threading synchronization primitives. With Windows 2000 and later you have up to 1088 TLS l

Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for windows)

2003-09-25 Thread Keith Bottner
helps. Keith -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 11:57 AM To: Keith Bottner Cc: 'Tom Lane'; 'Claudio Natoli'; 'Robert Treat'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [HACKERS] Thre

Re: [HACKERS] Threads vs Processes

2003-09-25 Thread Keith Bottner
Actually you can use a DLL with LoadLibrary as long as you do the following. When a process uses load-time linking with this DLL, the entry-point function is sufficient to manage the thread local storage. Problems can occur with a process that uses run-time linking because the entry-point function