Re: win32lib et multitasking

new topic     » goto parent     » topic index » view thread      » older message » newer message

I was under the impression that libraries like win32lib and wxEuphoria would not
work with multitasking, because the winMain() (or equivalent) procedure does not
have a task_yield() statement, and therefore will not give up control of the main
task to the scheduler. I would that that this statement would have to be added
for multitasking to work with these libraries.

For example, a win32lib application main loop is basically something like this:

procedure eventLoop(integer id, atom Flag)
--SNIP--
    -- message loop
    while Flag != 0
      and ActiveEL[el] = 0
      and vWinMainState = kStarted do
        --SNIP--   

        w32Proc( xTranslateMessage, { msg } )
        w32Proc( xDispatchMessage, { msg } )
        Flag -= inc
--ADD THIS STATEMENT HERE:
        task_yield()

    end while
--SNIP--
end procedure

global procedure WinMain( object id, integer style )
    --SNIP--
    -- Start processing the message events.
    eventLoop(0, -1)
    --SNIP--
end procedure

WinMain(winmain, 0)


What I'm saying is, I would think that this main loop in win32lib.ew that
handles the win32 messages would need task_yield() added. (Similar circumstance
in wxEuphoria, too). Am i correct?

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu