Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6

Thread: Threads

  1. #1
    Join Date
    May 2005
    Posts
    1,115

    Threads

    Is there a way to create, program, and run a seperate threads using LUA in APMS?
    Never know what life is gonna throw at you.
    (Based on a true story.)

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    Although Lua does not have true multithreading, it does support "coroutines":

    http://www.lua.org/manual/5.0/manual.html#2.10

  3. #3
    Join Date
    May 2005
    Posts
    1,115
    I've read about them, however, I'm searching for something similar to On Timer event...
    So that part of my code can run concurrently with the chunk of code which calls it.
    Never know what life is gonna throw at you.
    (Based on a true story.)

  4. #4
    Join Date
    Jan 2000
    Posts
    2,002
    You could make the coroutine yield and resume on the timer... never tried it but a possibility.

  5. #5
    Join Date
    May 2005
    Posts
    1,115
    Quote Originally Posted by Brett
    You could make the coroutine yield and resume on the timer... never tried it but a possibility.
    I thought about that actually... will try it once!
    Never know what life is gonna throw at you.
    (Based on a true story.)

  6. #6
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Here is a link to a tutorial for coroutines from the lua-users page

    http://lua-users.org/wiki/CoroutinesTutorial

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. Problem Enumerating Threads???
    By bmreeves in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 06-23-2005, 07:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts