Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
Bone to the bad.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.



Parallel while/whilst statement

Wouldn't it be more efficient to download while installing? Or processing calculations while reading files? I'm using the word "while" to mean "whilst"
  [vote for,

The computer should work out the rate and buffer sizes for each task.

Otherwise you need to write complicated error prone threaded code to handle this stuff and shift between buffers.

it could work by automatically doubling all the buffers and flipping between them quickly as they are emptied and used up, a bit like TCP window sizes.

parallel whilst { parallel while {

char buf[1024];

os.read("/bigfile", 1024, buf);

} parallel while {

lines = split(buf, "\n"); }

parallel while {


} }

chronological, Jul 30 2022

Python, Thread-based parallelism https://docs.python...rary/threading.html
[a1, Jul 30 2022]


       Are you asking for a low level capability or just a new syntax? Threading and multiprocessing are WKTE in Python and other languages, aren’t they?
a1, Jul 30 2022


       Threading is hard to get right. The threading should be hidden behind the easiness of the syntax.   

       The problem with threading is data races and synchronization.   

       Essentially with the proposed syntax, one of the two automatically created buffers shall be passed to the next thread in the thread pool, for its parallel processing and onto the next.   

       The buffer shall be reloaded with content and then flipped to the next.
chronological, Jul 30 2022


back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle