You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
Currently, inkwell::support::LLVMString implementing !Send, !Sync and Deref<Target = CStr>. This is clearly incorrect, as CStr implementing Send and Sync.
To Reproduce
Unrelated
Expected Behavior LLVMString is just an CStr with custom Drop, so it should be safe to send it's reference to other threads.
On the other hands, i've searched some informations about LLVM Messages, and i don't found any documents saying it's not thread-safe. In this case, LLVMString should implement Send as well.
LLVM Version (please complete the following information):
LLVM Version: [Unrelated]
Inkwell Branch Used: [Unrelated]
Desktop (please complete the following information):
OS: [Unrelated]
Additional Context
None
The text was updated successfully, but these errors were encountered:
I agree that I think LLVMString should be Send (and maybe Sync?), but I think your analysis is slightly off in that it's more like CString, not CStr. &CStr (which is like &str) shouldn't be Send nor Sync when the reference is non static.
Yes, you're right. LLVMString has string's ownership, it more like a CString.
&CStr (which is like &str) shouldn't be Send nor Sync when the reference is non static.
Not exactly, although thread::spawn does ask for values to be 'static, Send and Sync trait has nothing to do with lifetimes. And, infact, CStr does implements Send and Sync(which means &CStr also implements them)
Describe the Bug
Currently, inkwell::support::LLVMString implementing
!Send
,!Sync
andDeref<Target = CStr>
. This is clearly incorrect, asCStr
implementingSend
andSync
.To Reproduce
Unrelated
Expected Behavior
LLVMString
is just anCStr
with customDrop
, so it should be safe to send it's reference to other threads.On the other hands, i've searched some informations about LLVM Messages, and i don't found any documents saying it's not thread-safe. In this case,
LLVMString
should implementSend
as well.LLVM Version (please complete the following information):
Desktop (please complete the following information):
Additional Context
None
The text was updated successfully, but these errors were encountered: