mirror of https://github.com/nocturn9x/giambio.git
Fixed some typos and errors
This commit is contained in:
parent
3661e75eec
commit
490b729804
|
@ -21,7 +21,7 @@ that most of the following text is ~~stolen~~ inspired from its documentation)
|
|||
|
||||
# What the hell is async anyway?
|
||||
|
||||
Libraries like giambio shine the most when it comes to performing asyncronous I/O (reading a socket, writing to a file, that sort of thing).
|
||||
Libraries like giambio shine the most when it comes to performing asynchronous I/O (reading from a socket, writing to a file, that sort of thing).
|
||||
The most common example of this is a network server that needs to handle multiple connections at the same time.
|
||||
One possible approach to achieve concurrency is to use threads, and despite their bad reputation in Python, they
|
||||
actually might be a good choice when it comes to I/O for reasons that span far beyond the scope of this tutorial.
|
||||
|
@ -515,7 +515,7 @@ of its children task and ask `giambio.run` to wake him up after a given amount o
|
|||
|
||||
__Note__: You may wonder whether you can mix async libraries: for instance, can we call `trio.sleep` in a
|
||||
giambio application? The answer is no, we can't, and this section explains why. When you call
|
||||
`await giambio.sleep`, it asks `giambio.run` to pause the current task, and to do to it talks a language
|
||||
`await giambio.sleep`, it asks `giambio.run` to pause the current task, and to do so it talks a language
|
||||
that only `giambio.run` can understand. Other libraries have other private "languages", so mixing them is
|
||||
not possible: doing so will cause giambio to get very confused and most likely just explode spectacularly badly
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class BaseDebugger(ABC):
|
|||
This method is called when the event
|
||||
loop starts executing
|
||||
"""
|
||||
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
|
@ -40,7 +40,7 @@ class BaseDebugger(ABC):
|
|||
This method is called when the event
|
||||
loop exits entirely (all tasks completed)
|
||||
"""
|
||||
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
|
@ -51,12 +51,12 @@ class BaseDebugger(ABC):
|
|||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
:param delay: The delay, in seconds, after which
|
||||
the task will start executing
|
||||
:type delay: int
|
||||
"""
|
||||
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
|
@ -67,11 +67,11 @@ class BaseDebugger(ABC):
|
|||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@abstractmethod
|
||||
def on_task_exit(self, task: Task):
|
||||
"""
|
||||
|
@ -79,20 +79,20 @@ class BaseDebugger(ABC):
|
|||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@abstractmethod
|
||||
def before_task_step(self, task: Task):
|
||||
"""
|
||||
This method is called right before
|
||||
calling its run() method
|
||||
calling a task's run() method
|
||||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
@ -101,11 +101,11 @@ class BaseDebugger(ABC):
|
|||
def after_task_step(self, task: Task):
|
||||
"""
|
||||
This method is called right after
|
||||
calling its run() method
|
||||
calling a task's run() method
|
||||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
@ -118,23 +118,23 @@ class BaseDebugger(ABC):
|
|||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
:param seconds: The amount of seconds the
|
||||
task wants to sleep
|
||||
:type seconds: int
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@abstractmethod
|
||||
def after_sleep(self, task: Task, seconds: Union[int, float]):
|
||||
"""
|
||||
This method is called before after a tasks
|
||||
This method is called after a tasks
|
||||
awakes from sleeping
|
||||
|
||||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
:param seconds: The amount of seconds the
|
||||
task actually slept
|
||||
:type seconds: int
|
||||
|
@ -178,7 +178,7 @@ class BaseDebugger(ABC):
|
|||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
@ -191,7 +191,8 @@ class BaseDebugger(ABC):
|
|||
|
||||
:param task: The Task object representing a
|
||||
giambio Task and wrapping a coroutine
|
||||
:type task: class: giambio.objects.Task
|
||||
:type task: :class: giambio.objects.Task
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
|
Loading…
Reference in New Issue