Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 9 10 11 12 13 … 18 Next »
Questions...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Questions...
29-05-2016, 09:13 AM,
#1
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
Questions...
Hey all,
I noticed about the channels now async : are all methods thread safe ? Is the callback still called on main thread ?
About the timers limit, will the coroutine library get the same issue ?
Find
Reply
29-05-2016, 12:47 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Questions...
Asynchronous does not mean concurrent threads are involved. It just means that your message is sent some time in the future after you tell it to be sent, rather than immediately. This ensures that your chip is not held up by the listeners of others.

The timer limit is purely because all timers are going through the engine's timer system, so having too many will hold up others. Coroutines are standard Lua objects, there's nothing about them that requires a specific limit.
Find
Reply
29-05-2016, 02:10 PM,
#3
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Questions...
OK I see now, so I'm going to replace 90% of LanAI tasks by coroutines using the wait method. All output will be added to a table that will be parsed directly by chat listener hud (through global tables)...

This should allow me to put another 10 more tasks running at the same time if needed (obviously LanAI uses only 5 tasks so...)
Find
Reply
29-05-2016, 04:55 PM,
#4
LocInt Offline
Long gone
****
Posts: 489
Threads: 91
Joined: Aug 2014
RE: Questions...
I am using a queue for messages and timers.

тѕсм.Person8880 hovers the nerf bat over Tetryon damage
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.