Sign in Join

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

Mailing lists / fpc-pascal / 2001-01

Re: More clone() stuff

2 messages · 2 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: Hi again. Umm, I'm having trouble making write()'s and connect/recv() calls in a…
FPC Mail list reader wrote 10 lines
Hi again. Umm, I'm having trouble making write()'s and connect/recv() calls in a multithreaded app. Is there anything else I should know besides the fact that I can't call write() simultaneously from 2 threads(that should be fixed just by checking if another thread is calling write(), right ?)? I've read some stuff about using recv()/send in multithreaded environs, but it was pretty confusing. The question is "can recv() be called from 2 threads at the same time ?".

Normally they should, because these are direct kernel calls ? But you should check whether the file descriptors for sockets aren't closed when Clone() is called.

Michael.

FPC Mail list reader

Hi again.

Umm, I'm having trouble making write()'s and connect/recv() calls in a multithreaded app. Is there anything else I should know besides the fact that I can't call write() simultaneously from 2 threads(that should be fixed just by checking if another thread is calling write(), right ?)? I've read some stuff about using recv()/send in multithreaded environs, but it was pretty confusing. The question is "can recv() be called from 2 threads at the same time ?".

Thanx for reading (again?)

Bogdan.