Raised This Month: $51 Target: $400
 12% 

Async heavy load


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cosmo1337
Junior Member
Join Date: Feb 2020
Old 07-26-2023 , 10:54   Async heavy load
Reply With Quote #1

Hi All,

Is there any fucntions that would allow to process a heavy load seperatly, without blocking the main proccessing thread?

I need to process a file with an avarage of 3 - 10+ Megabytes each second. Data is being prepared but still needs to be processed without blocking.

So is there anything?
Some threaded call backs?
Something backgroud threaded? Task.Create -?.
C++ extensions, is it possible?
Native plugin?
Exposing filedata as a service -> async request?

ty!
Cosmo1337 is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 08-04-2023 , 13:54   Re: Async heavy load
Reply With Quote #2

Quote:
Originally Posted by Cosmo1337 View Post
Hi All,

Is there any fucntions that would allow to process a heavy load seperatly, without blocking the main proccessing thread?

I need to process a file with an avarage of 3 - 10+ Megabytes each second. Data is being prepared but still needs to be processed without blocking.

So is there anything?
Some threaded call backs?
Something backgroud threaded? Task.Create -?.
C++ extensions, is it possible?
Native plugin?
Exposing filedata as a service -> async request?

ty!
Hi!

This is a limitation within SourcePawn's virtual machine. We cannot call into SP from another thread, so this is not currently possible.

If you can, you could chunk the task on something like a repeating timer and only process N amount of data each game frame. Upon completion, and you have all the data parsed in, you'd be able to do what you need with it.
headline is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode