1. Re: mac.ex
- Posted by Hawke <mdeland at NWINFO.NET> Sep 23, 1998
- 432 views
Pete Eberlein wrote: >Another thing that might be of interest to the OS folk, >is that it might not be too difficult to add multi-threading >capability to PEU. The interpreter could easily switch >between which set of bytecodes to execute at any given time. >How to start another thread is the question... (from an .ex >file most likely) and whether or not each thread shares the >same global variables... things could get messy. *ponder* starting threads could be done in a way similar to the 'taskswitcher' implemented in langwar dontcha think? the good ol' pseudo-cooperative, pseudo-preemptive multitasker :) i think that they should def'nly have access to global constructs. think about the multithreading implemented in MSword. the spellchecker fixes mistakes _as you type_ if the spellchecker cannot access the document in question, what good is she? yes, it can be messy tho, if a thread changes a value while another thread needs that value, quite messy. simple: threads cannot *write* to global variables. the program can read/write whatever the he|_|_o it wants. the threads can poll the globals when their turn at the processor comes, read the global info (document), act like a good little thread (pop msgbox) and tell the user that the user types like a 3 legged donkey without hooves, and give the control back to the program (text editor) for the user to fix their lameness. :) threads also can have their own persistent data, i might add. their personal local variables need to be saved between their time alloted at the processor. >Open source is so cool... quite! >the Portable Part of PEU isn't up to Par, Presently it is >Pretty Poopy. oh! the alliteration! ya Feel Fuzzy and Feigntedly Faint From yer Fedora to yer Feet! [discard] >I need a write-only variable so I'm not tempted to do this... >or a place where I can put my junk and not be able to dig >through it later. interesting proposition... sorta like the opposite of constant,no? gotta think on that one a bit... --Hawke'