From 922fc7edfc62c41e39cd585a38d0288db8f2a7c0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 6 Apr 2016 10:57:30 +0900 Subject: [PATCH] doc: goroutine-safe -> concurrent-safe --- input.go | 14 +++++++------- run.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/input.go b/input.go index 703fb5bb0..5e02babc4 100644 --- a/input.go +++ b/input.go @@ -20,28 +20,28 @@ import ( // IsKeyPressed returns a boolean indicating whether key is pressed. // -// This function is goroutine-safe. +// This function is concurrent-safe. func IsKeyPressed(key Key) bool { return ui.CurrentInput().IsKeyPressed(ui.Key(key)) } // CursorPosition returns a position of a mouse cursor. // -// This function is goroutine-safe. +// This function is concurrent-safe. func CursorPosition() (x, y int) { return ui.CurrentInput().CursorPosition() } // IsMouseButtonPressed returns a boolean indicating whether mouseButton is pressed. // -// This function is goroutine-safe. +// This function is concurrent-safe. func IsMouseButtonPressed(mouseButton MouseButton) bool { return ui.CurrentInput().IsMouseButtonPressed(ui.MouseButton(mouseButton)) } // GamepadAxisNum returns the number of axes of the gamepad. // -// This function is goroutine-safe. +// This function is concurrent-safe. // // NOTE: Gamepad API is available only on desktops, Chrome and Firefox. // To use this API, browsers might require rebooting the browser. @@ -51,7 +51,7 @@ func GamepadAxisNum(id int) int { // GamepadAxis returns the float value [-1.0 - 1.0] of the axis. // -// This function is goroutine-safe. +// This function is concurrent-safe. // // NOTE: Gamepad API is available only on desktops, Chrome and Firefox. // To use this API, browsers might require rebooting the browser. @@ -61,7 +61,7 @@ func GamepadAxis(id int, axis int) float64 { // GamepadButtonNum returns the number of the buttons of the gamepad. // -// This function is goroutine-safe. +// This function is concurrent-safe. // // NOTE: Gamepad API is available only on desktops, Chrome and Firefox. // To use this API, browsers might require rebooting the browser. @@ -71,7 +71,7 @@ func GamepadButtonNum(id int) int { // IsGamepadButtonPressed returns the boolean indicating the buttons is pressed or not. // -// This function is goroutine-safe. +// This function is concurrent-safe. // // NOTE: Gamepad API is available only on desktops, Chrome and Firefox. // To use this API, browsers might require rebooting the browser. diff --git a/run.go b/run.go index c6ace3eae..09f89ce9e 100644 --- a/run.go +++ b/run.go @@ -134,7 +134,7 @@ const FPS = 60 // CurrentFPS returns the current number of frames per second of rendering. // -// This function is goroutine-safe. +// This function is concurrent-safe. // // This value represents how many times rendering happens in 1/60 second and // NOT how many times logical game updating (a passed function to Run) happens. @@ -148,7 +148,7 @@ func CurrentFPS() float64 { // The game screen is not updated when IsRunningSlowly is true. // It is recommended to skip heavy processing, especially drawing, when IsRunningSlowly is true. // -// This function is goroutine-safe. +// This function is concurrent-safe. func IsRunningSlowly() bool { return currentRunContext.IsRunningSlowly() } @@ -230,21 +230,21 @@ func Run(f func(*Image) error, width, height, scale int, title string) error { // SetScreenSize changes the (logical) size of the screen. // This doesn't affect the current scale of the screen. // -// This function is goroutine-safe. +// This function is concurrent-safe. func SetScreenSize(width, height int) { currentRunContext.SetScreenSize(width, height) } // SetScreenSize changes the scale of the screen. // -// This function is goroutine-safe. +// This function is concurrent-safe. func SetScreenScale(scale int) { currentRunContext.SetScreenScale(scale) } // ScreenScale returns the current screen scale. // -// This function is goroutine-safe. +// This function is concurrent-safe. func ScreenScale() int { return ui.CurrentUI().ScreenScale() }