Skip site navigation (1) Skip section navigation (2)

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

From: "Keith Bottner" <kbottner(at)comcast(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"'Claudio Natoli'" <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "'Robert Treat'" <xzilla(at)users(dot)sourceforge(dot)net>,"'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>,<pgsql-hackers(at)postgresql(dot)org>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for windows)
Date: 2003-09-25 16:50:24
Message-ID: 001c01c38385$1d9021e0$7d00a8c0@juxtapose (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
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 locations that you can use, of course these can be pointers to memory
which can store whatever you want. 

Keith

-----Original Message-----
From: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Thursday, September 25, 2003 9:17 AM
To: Claudio Natoli
Cc: Robert Treat; Bruce Momjian; pgsql-hackers(at)postgresql(dot)org;
pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL
for windows) 


Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> FWIW, I've got a threaded version of the WIN32_DEV branch more or less 
> "running" (it is a terrible hack job, so NO, no patches... yet :-), as 
> a proof of concept. Still a work in progress (ok, I've qualified it 
> enough), but it is showing enough promise to convince me that 
> threading is the way to go for the Win32 port.

How are you dealing with the issue of wanting some static variables to be
per-thread and others not?

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


In response to

Responses

pgsql-hackers by date

Next:From: Zhen YangDate: 2003-09-25 16:55:48
Subject: Re: Question on adding new indexes to Postgresql
Previous:From: markwDate: 2003-09-25 16:21:47
Subject: Re: More Prelimiary DBT-2 Test Results with PostgreSQL

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2003-09-25 16:57:09
Subject: Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for
Previous:From: Manfred SpraulDate: 2003-09-25 16:03:00
Subject: Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group