DOTSNET
  • Documentation
  • Overview
    • Installation
    • Recommended Reading
    • Platforms
    • Changelog
  • Examples
    • Benchmark
    • Chat
    • Pong
    • Physics
  • User Manual
    • Migrating from Mirror
    • Authoring
    • Server & Client Worlds
    • Selective System Authoring
    • Dependency Injection
    • NetworkMessage
    • NetworkServerSystem
    • NetworkClientSystem
    • NetworkIdentity
    • NetworkComponent
    • PrefabSystem
    • NetworkReader/Writer
    • Bitpacking
    • Authentication
    • Interest Management
    • Transports
    • Networking & Burst
    • Networking & Jobs
    • Compression
    • Utilities & Extensions
    • Unity.Physics Support
    • Hybrid Renderer V2 / URP
    • Benchmarks
Powered by GitBook
On this page
  1. User Manual

Networking & Jobs

While the C# Job system is very powerful, it is not the solution to every networking problem.

Fire & Forget is a good rule of thumb when it comes to networking & Jobs.

  • If you can fire up a computation and forget about it, then it’s a good idea to use a Job.

  • If you need the computation’s result in the main thread, or if the computation is time critical, then think twice before using a Job.

For example:

  • The 10k Example’s MonsterMovementSystem is a great use case for a Job. We simply move all monsters in a Job without caring about the result.

  • The NetworkServerSystem would be a bad example for a Job because we need the result in the main thread to call NetworkServerSystem.Send() from the main thread.

Most of DOTSNET is bursted & single threaded. Make it work, then make it fast.

PreviousNetworking & BurstNextCompression

Last updated 4 years ago