|
|
|
![]() |
|
Strumenti |
![]() |
#21 | |
Senior Member
Iscritto dal: Nov 2005
Città: TO
Messaggi: 5206
|
Quote:
Uhm ... potrebbe funzionare, salvo questioni di atomicità. Ho letto che: Reading or writing pipe data is atomic if the size of data written is not greater than PIPE_BUF. This means that the data transfer seems to be an instantaneous unit, in that nothing else in the system can observe a state in which it is partially complete. Atomic I/O may not begin right away (it may need to wait for buffer space or for data), but once it does begin it finishes immediately. PIPE_BUF, da quello che ho visto negli include, vale 4096.
__________________
Andrea, SCJP 5 (91%) - SCWCD 5 (94%) |
|
![]() |
![]() |
![]() |
#22 |
Senior Member
Iscritto dal: Dec 2002
Messaggi: 3359
|
sisi esatto proprio così, ho fatto una prova con le stringhe e funziona, quindi siccome è atomica direi che posso farlo in tutta tranquillità giusto?
Ho problemi a trasferire strutture, ho creato un altro thread apposito però se puoi darci un'occhio visto che per te saranno bazzecole ![]() |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:37.