You might dream the solution. That's what happens to me when I'm designing hardware. I go to bed thinking of the problem and in the morning, I have the solution. I'll cross my fingers.
All the Best, and Thanks for Pale Moon,
Mark.
Moderator: trava90



Sure it's possible, MC. Preemptive dispatchers do it all the time. If a task is non-responding, the dispatcher kills it. What I'm suggesting is that instead of killing, the dispatcher put up a control so that the user can decide whether to kill and what to kill. The user knows what tab (or window) is screwing up.


You have misinterpreted my suggestions for corrections. They're not corrections. They are suggestions that go beyond what would normally be needed for a single-threaded application, but suggestions that I think will work and that you might find useful for other things, too. Take whatever you want from the suggestions, or take nothing, or ask me to explain what I refer to. I'd be happy to explain for however long it takes.

Agreed. That's why it cannot be an external process. In my own clumsy way I'm suggesting that an executive that launches the main PM app and handles mallocs & forks on a per-tab basis (as a service to the main PM app), would then have the power to kill on a per-tab basis by freeing bound memory & closing the offending tab via brute force (and with user identification of which tab is the offending tab ...something the user will absolutely know). For the executive, I favor Mealy-Moore state machines
Code: Select all
while(true) {
switch(currentState) {
case 1: switch(inputs) { case 1: outputs=...; break; case 2: outputs=...; break; case 3: outputs=...; break; etc.} currentState=...; break;
case 2: switch(inputs) { case 1: outputs=...; break; case 2: outputs=...; break; case 3: outputs=...; break; etc.} currentState=...; break;
case 3: switch(inputs) { case 1: outputs=...; break; case 2: outputs=...; break; case 3: outputs=...; break; etc.} currentState=...; break;
etc.
}
}
Unfeasible, I agree. But if the executive held the 'kill' buttons up to the user ...As for a UI button directly inside the browser ...
I agree again. I can already use the System Monitor to kill the whole application. Killing the whole application is painful and provokes a selective restore when relaunched. The trick I'm proposing is to kill offending tabs on a per-tab basis (with help from the user).A UI button outside the browser is just like using "kill" ...


I can understand why you would think that. Actually, that would be inefficient. All tabs could be serviced via a service loop: while(true) { }. Only one tab will have focus and the others would simply 'return'.
I have no idea what you are talking about.markfilipak wrote: ↑2019-11-04, 20:48I can understand why you would think that. Actually, that would be inefficient. All tabs could be serviced via a service loop: while(true) { }. Only one tab will have focus and the others would simply 'return'.
That doesn't work. Pages that are open in the background need processing of events for their scripting or they will break. Not to mention things like media. A tab "having focus" doesn't mean "all other tabs are frozen".markfilipak wrote: ↑2019-11-04, 20:48I can understand why you would think that. Actually, that would be inefficient. All tabs could be serviced via a service loop: while(true) { }. Only one tab will have focus and the others would simply 'return'.


Okay. That doesn't matter. The point is that all tabs can be serviced serially; multi-threading of the individual tabs is not required.Moonchild wrote: ↑2019-11-04, 21:02That doesn't work. Pages that are open in the background need processing of events for their scripting or they will break. Not to mention things like media. A tab "having focus" doesn't mean "all other tabs are frozen".markfilipak wrote: ↑2019-11-04, 20:48I can understand why you would think that. Actually, that would be inefficient. All tabs could be serviced via a service loop: while(true) { }. Only one tab will have focus and the others would simply 'return'.


Ah! I thought PM was written in 'C'. Javascript, eh? That does change things. I've written some js, about 8- or 9-thousand lines including a full-on WinXP emulator with real-looking, XP controls that pushed in -- remember those days? -- and dragable, resizeable windows with emulated focus & visual sorting with new window creation and web-page populating, etc. and even 2- & 3- column layout (like a book) done automagically with columns automatically balanced -- I was especially proud of them. I layed everything out hidden, then measured them in the DOM, then shuffled the text around and unhid them when the columns were balanced. It was crazy hard but fun.Moonchild wrote: ↑2019-11-04, 21:40You should probably read some material to understand how Javascript tasks and queues work. This isn't Java or C, things on threads can't be suspended and then resumed. JS is primarily event driven through an event loop.
Keep in mind that the browser application itself is also JS driven.
https://developer.mozilla.org/en-US/doc ... /EventLoop


I know how to create fully interactive pages within browsers (which is the subject of the link you provided, and of the other stuff around that link), but in a window in Linux? (which is PM's runtime environment), I don't have a clue how to get started.

