I'm looking at preemptive mode again and, again, tried something I wondered
about. "What happens when you inject bad code?" Say you've got a preemptive
thread, it can't use MESSAGE. If you put MESSAGE in the call chain, the
Compiler complains. Go the Compiler! But what happens if you have a method
that calls MESSAGE:

Display_Message

The Compiler complains. Go the Compiler!

Now what if you have this:

CALL WORKER("Preeemptive_Worker";"Display_Message";"Hello world!")

It's illegal - you're injecting code into the preemptive worker that
requires cooperative mode to work. What happens? It really depends. It
isn't consistent, it isn't documented, and it isn't good.

I've put more details into a feature request here:

Provide developer control when a preemptive worker receives non-preemptive
code
http://forums.4d.fr/Post//19391591/1/

Given how many people seem excited about preemptive threads for some
reason, I'm surprised that this hasn't come up. That also makes me
entertain the possibility that I'm being stupid or, more likely, trapped in
some kind of tunnel vision. So, if I've missed the obvious. I'll be
embarrassed, and then I'll get over it. So, don't be shy, feel free to make
me look dumb.

Or, if not, feel free to jump in and vote for my feature requests. I think
we need an incoming-code-for-execution inspection phase anyway.

Note: I'm working from a little scratch database that I've built today. No
frills, very simple code. I'm using 16.1 on OS X and have tried various
things in stand-alone and under 4D Server.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to