79217297

Date: 2024-11-23 06:42:15
Score: 0.5
Natty:
Report link

Is there a way to distribute editable global variable string across multiprocessing and threads?

You gave few details about your code; the OP doesn't offer a repex.

Across threads is straightforward. Though you probably want to protect access with a mutex.

Across processes implies writing to a file descriptor, such as a pipe or an mmap'd file. Easiest thing to do would be to append lines to a log file, or INSERT rows in a relational database.

Reasons:
  • Blacklisted phrase (1): Is there a way
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there a
  • High reputation (-2):
Posted by: J_H