瀏覽代碼

fix missing imports

Robin Bergewski 5 月之前
父節點
當前提交
ec71a5afb1
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 2 0
      core/sync/chan/chan.odin
  2. 1 0
      core/sync/chan/doc.odin

+ 2 - 0
core/sync/chan/chan.odin

@@ -165,6 +165,8 @@ Creates a buffered version of the specified `Chan` type.
 
 Example:
 
+	import "core:sync/chan"
+
 	create_buffered_example :: proc() {
 		c, err := chan.create_buffered(chan.Chan(int), 10, context.allocator)
 		assert(err == .None)

+ 1 - 0
core/sync/chan/doc.odin

@@ -17,6 +17,7 @@ Example:
 
 	import "core:sync/chan"
 	import "core:fmt"
+	import "core:thread"
 
 	// The consumer reads from the channel until it's closed.
 	// Closing the channel acts as a signal to stop.