Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2002-11

Custom thread Data?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

andrew johnson

Now that mulit-threading is available in 1.1, will it be possible to add something like windows tlsSetValue etc for custom thread data? I think it should be possible to do directly via pthread_setspecific etc, but it would be nice if it was part of rtl or fcl for cross win/*nix support, something like can be done in Delphi with TlsGetValue( hAlternateSession),and so forth.

Andrew

Reply by email

Peter Vreman
to andrew johnson
you wrote 6 lines
Now that mulit-threading is available in 1.1, will it be possible to add something like windows tlsSetValue etc for custom thread data? I think it should be possible to do directly via pthread_setspecific etc, but it would be nice if it was part of rtl or fcl for cross win/*nix support, something like can be done in Delphi with TlsGetValue( hAlternateSession),and so forth.

You can use threadvar to declare a variable to be thread specific.

Peter

Reply by email

Florian Klaempfl
to Peter Vreman
you wrote 9 lines
At 04:25 14-11-2002, you wrote: >Now that mulit-threading is available in 1.1, will it be possible to add >something like windows tlsSetValue etc for custom thread data? I think >it should be possible to do directly via pthread_setspecific etc, but it >would be nice if it was part of rtl or fcl for cross win/*nix support, >something like can be done in Delphi with TlsGetValue( >hAlternateSession),and so forth. You can use threadvar to declare a variable to be thread specific.

I think he meant accessing the thread specific data for a particular thread.

Reply by email