Jump to content


Photo

How does coroutine.schedule work under the hood?


    2 replies to this topic

    #1 Nifim

    Nifim

      Member

    • Members
    • PipPip
    • 13 posts
    • LocationWashington

    Posted 23 August 2017 - 07:20 PM

    I was wondering if someone could share how winodwers coroutine.schedule works. And to be clear i do not mean how do i use it in an addon, i am hoping to get deeper info. The normal coroutine lib does not have schedule and i am wondering how that is implemented. Ofcouse, if its something your not sharing at this time, then thats fine.

    Also, thanks for making windower i have learned a lot using it.

    #2 sdahlka

    sdahlka

      Advanced Member

    • Members
    • PipPipPip
    • 324 posts

      Posted 23 August 2017 - 08:07 PM

      coroutine.schedule creates a paused thread that runs after the included wait time
      and because in gearswap you cant use wait(sec) this is the only way to do something after a gearswap runs a function

      #3 Nifim

      Nifim

        Member

      • Members
      • PipPip
      • 13 posts
      • LocationWashington

      Posted 24 August 2017 - 01:05 AM

      That is actually not quite was i was looking for. I am looking for how the coroutine.schedule take the args passed to it and does what it does. since it is not included in the vanilla lua  corourtine lib and i want to use something like that scheduling in another none windower project so i was curious how it is actually implemented here. Not sure if that info that the windower team want to share but figure if i dont ask i wont know :)






      1 user(s) are reading this topic

      0 members, 1 guests, 0 anonymous users