What “thread safe” really means…In Practical terms

前端 未结 7 901
再見小時候
再見小時候 2021-01-30 13:24

please bear with my newbie questions..

I was trying to convert PDF to PNG using ghostscript, with ASP.NET and C#. However, I also read that ghostscript is not thread saf

7条回答
  •  逝去的感伤
    2021-01-30 13:36

    In general it is an ambiguous term.

    Thread-Safety could be at the conceptual level, where you have correct synchronization of your shared data. This is usually, what is meant by library writers.

    Sometimes, it means concurrency is defined at the language level. i.e. the memory model of the language supports concurrency. This is tricky! because as a library writer you can't produce concurrent libraries, because the language have no guarantees for many essential primitives that are needed to use. This concerns compiler writers more than library users. C# is thread-safe in that sense.

    I know I didn't answer your question directly, but hope that helps.

提交回复
热议问题