Worker Process, New Signal, and On Resize form event?

v17r6 Windows
So: I’ve found found a fantastic use case for the New Signal command.
Then a (seemingly) major gotcha.
I’m hoping someone can tell me otherwise:

SUMMARY:
It seems to me that using New Signal to call a worker process from an on resize form event is a killer.

DETAILS:
I have a method to return to me the “OBJECT GET BEST SIZE” for a specified text/font/size/style: that does NOT need to tamper with forms in the current process: and that can potentially run in preemptive-safe.
I accomplish this by calling a worker process to do the actual OBJECT GET BEST SIZE call, using the New Signal command to return my results.

My particular use case would include being called from a on-screen form, that the user may re-size, and should see fonts re-flow on the screen.

However, when I actually run the code: it seems that my worker process runs and completes correctly: issuing a $MySignal.trigger() at the end: but my calling process (often in an “on resize” form event) often gets totally stuck waiting for the signal: like a temporary database freeze.

Ive tried it (the calling process) by either using $Signal_ob.wait(1), and by doing repeat, IDLE, Until ($Signal_ob.signaled).

Here is my tiny sample database.

https://forums.4d.com/4DBB_Main/x_User/1166023/files/32855491.zip

Perhaps part of the question here is:

  • Is it possible in 4D to do a FORM LOAD and FORM UNLOAD IN one process, while within an On Resize form event of another process.

I think it is an issue with how On Resize works in a blocking mode. I have a similar implementation to compute best text size but it uses an invisible form window that stays alive all the time. It is called using CALL FORM. This works fine in all contexts where I have been using it. But if I call it from an On Resize form event 4D locks up with the spinning color ball and I have to force quit. Tested with 4D 18 Mac, latest beta version.

John,
Thanks: I think you’re right.

I wish 4D would fix this.

So my story is this:
I recoded my method to solve two problems:
1: there is no “GET” for the FORM LOAD command to tell me the name of the previously loaded form: so that I can always return to my context
2: Can’t run this command in Preemptive
… but in re-coding to a worker process: now, it doesn’t work in another context: when being called from on-resize.

Perhaps I’ll add a couple feature requests.