Sign in Join

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

Mailing lists / fpc-pascal / 2001-01

Re: Clone vs. pthreads

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt
to FPC Mail list reader: Hello. Someone replied to a question about writing tcp servers, and said that Linux's…
FPC Mail list reader wrote 8 lines
Hello. Someone replied to a question about writing tcp servers, and said that Linux's Clone() isn't fit for writing a crash-safe server or something like that. Well what I want to ask is why(besides, I guess, the lack of portability to FreeBSD) and if there is a unit for fpc that translates pthreads to fpc.

I see no reason why clone() wouldn't be the way to do threads ? pthreads itself probably uses this function to implement threads.

That said: No there is no unit (yet) that implements a pthreads interface.

Michael.

Marco van de Voort
to FPC Mail list reader: Hello. Someone replied to a question about writing tcp servers, and said that Linux's…
Show quoted text 5 lines
Someone replied to a question about writing tcp servers, and said that Linux's Clone() isn't fit for writing a crash-safe server or something like that. Well what I want to ask is why(besides, I guess, the lack of portability to FreeBSD) and if there is a unit for fpc that translates pthreads to fpc.

FPC/FreeBSD Linux unit (which is going to be renamed to Unix in 1.2) has Clone too, except that not all parameters are supported (but most are), based on the rfork call (which isn't supported on Linux)

And yes, there is a pthreads port on the Contributed units page, but I didn't test it yet.

FPC Mail list reader

Hello.

Someone replied to a question about writing tcp servers, and said that Linux's Clone() isn't fit for writing a crash-safe server or something like that. Well what I want to ask is why(besides, I guess, the lack of portability to FreeBSD) and if there is a unit for fpc that translates pthreads to fpc.

Thanx for reading this,
Bogdan.