Python Forum
pickle.dump() and pickle.load() with non-blocking sockets
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pickle.dump() and pickle.load() with non-blocking sockets
#1
i need to have non-blocking sockets to use select or poll. that results in distinctive conditions for "no more data, yet" (because the other end is slow writing large data) and "no more data, ever" (because the other end was closed). there is an equivalent for writing that deals with available space (rather small for interprocess pipes). what i am wondering is how well pickle.dump() and pickle.load() handle this. anyone know?

the data i will be passing over a pipe with pickle will be variable in length. it could be something small (way less than 256 bytes) or something very large (well over 65536 bytes) so the option of writing a fixed size every time is very impractical. but if a small amount is written, i need to be sure nothing blocks trying to buffer more data when there isn't any (but not EOF, either)
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020