Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a generator and threads
#3
that and how being a generator might be involved with those conditions. if a generator spawns a thread, it depends on how things are coded to handle the yield. the yield will be expected to block the that did the yield. there will be some kind of internal object to represent the communication state of the yields. can it control the flow from both threads and merge the content? this could be done at the C layer in threads are considered in the design.

iterating the same generator may or may not be pointless. if it can be made to work (it can in C) it could be a good way to spread a work queue to many threads.
Tradition is peer pressure from dead people

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


Messages In This Thread
a generator and threads - by Skaperen - Oct-31-2022, 01:25 AM
RE: a generator and threads - by ndc85430 - Oct-31-2022, 06:38 AM
RE: a generator and threads - by Skaperen - Oct-31-2022, 05:47 PM
RE: a generator and threads - by Gribouillis - Oct-31-2022, 09:23 PM
RE: a generator and threads - by Skaperen - Nov-01-2022, 10:23 PM

Forum Jump:

User Panel Messages

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