CS server thread model question #648
-
Hello, guys, While the code base capabilities are gorgeous, I'm not much familiar with the CS2 codebase and APIs, and documentation of cssharp seems a weak point. So, I'm struggling to find information and hope you could help me with:
May be somewhere is a good documentation about above questions I've missed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey there!
Our documentation is available at https://docs.cssharp.dev/ also we have example plugins here: CounterStrikeSharp/tree/main/examples
Developers are actively sharing and discuss code snippets in our discord server, this might be a good boost for your knowledge about the game and engine We indeed miss summaries for a lot of things but they are mostly self explanatory
Our docs is based on contributions, we always appreciate commits to the docs
By default, everything runs on the main thread (except some cases, e.g.: plugin (hot)reload, etc..) unless the context is manually switched to an other thread by the developer. (for e.g.: There are no built-in Warning You can only access natives from the main thread What you can do though: once you are in a sync handler, do your async stuff inside Game event handlers are usually only serves notification purposes
the async versions of these methods are just wrapper methods, you can use them in async contexts so you don't have to switch between async and sync contexts These are removed from the schedule list after invocation (single use callback) |
Beta Was this translation helpful? Give feedback.
Hey there!
Our documentation is available at https://docs.cssharp.dev/ also we have example plugins here: CounterStrikeSharp/tree/main/examples
Developers are actively sharing and discuss code snippets in our discord server, this might be a good boost for your knowledge about the game and engine
We indeed miss summaries for a lot of things but they are mostly self explanatory
Our docs is based on contributions, we always appreciate commits to the docs