thread_js.odin 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //+build js
  2. package thread
  3. import "core:intrinsics"
  4. import "core:sync"
  5. import "core:mem"
  6. Thread_Os_Specific :: struct {}
  7. _thread_priority_map := [Thread_Priority]i32{
  8. .Normal = 0,
  9. .Low = -2,
  10. .High = +2,
  11. }
  12. _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^Thread {
  13. unimplemented("core:thread procedure not supported on js target")
  14. }
  15. _start :: proc(t: ^Thread) {
  16. unimplemented("core:thread procedure not supported on js target")
  17. }
  18. _is_done :: proc(t: ^Thread) -> bool {
  19. unimplemented("core:thread procedure not supported on js target")
  20. }
  21. _join :: proc(t: ^Thread) {
  22. unimplemented("core:thread procedure not supported on js target")
  23. }
  24. _join_multiple :: proc(threads: ..^Thread) {
  25. unimplemented("core:thread procedure not supported on js target")
  26. }
  27. _destroy :: proc(thread: ^Thread) {
  28. unimplemented("core:thread procedure not supported on js target")
  29. }
  30. _terminate :: proc(using thread : ^Thread, exit_code: int) {
  31. unimplemented("core:thread procedure not supported on js target")
  32. }
  33. _yield :: proc() {
  34. unimplemented("core:thread procedure not supported on js target")
  35. }