diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-07-18 15:44:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-18 15:44:29 -0400 |
| commit | 2e4b5770fa7e6dbf56845382706b33a22d6a025b (patch) | |
| tree | e58bcb7c446fcbffc8e1dd725636dbd737d946fc /docs/api-users-guide.md | |
| parent | da8f050f9865635e5778589e1e3883b614d73266 (diff) | |
Atomic ref counting for ISlangSharedLibrary (#2332)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Make ISlangSharedLibrary atomic ref counted.
Update docs to say most COM interfaces are *not* atomic ref counted.
* Upgrade slang-llvm to use version that atomic ref counts ISlangSharedLibrary.
* Fix some typos in docs.
* Fix ref count typo.
* Fix missing 'override'
Diffstat (limited to 'docs/api-users-guide.md')
| -rw-r--r-- | docs/api-users-guide.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/api-users-guide.md b/docs/api-users-guide.md index 90e7be9bc..d8ab31bc4 100644 --- a/docs/api-users-guide.md +++ b/docs/api-users-guide.md @@ -459,6 +459,8 @@ This assumes Slang has been built with the C++ multithreaded runtime, as is the All other functions and methods are not [reentrant](https://en.wikipedia.org/wiki/Reentrancy_(computing)) and can only execute on a single thread. More precisely function and methods can only be called on a *single* thread at *any one time*. This means for example a global session can be used across multiple threads, as long as some synchronisation enforces that only one thread can be in a Slang call at any one time. +Much of the Slang API is available through [COM interfaces](https://en.wikipedia.org/wiki/Component_Object_Model). In strict COM interfaces should be atomically reference counted. Currently *MOST* Slang API COM interfaces are *NOT* atomic reference counted. One exception is the `ISlangSharedLibrary` interface when produced from [host-callable](cpu-target.md#host-callable). It is atomically reference counted, allowing it to persist and be used beyond the original compilation and be freed on a different thread. + A Slang compile request/s (`slang::ICompileRequest` or `SlangCompileRequest`) can be thought of belonging to the Slang global session (`slang::IGlobalSession` or `SlangSession`) it was created from. Note that *creating* a global session is currently a fairly costly process, whereas the cost of creating and destroying a request is relatively small. The *simplest* way to multithread would be for a thread to |
