@@ -62,6 +62,12 @@ msgid ""
62
62
"authors of lower-level code, libraries, and frameworks, who need finer "
63
63
"control over the event loop behavior."
64
64
msgstr ""
65
+ "Os desenvolvedores de aplicação normalmente devem usar as funções asyncio de "
66
+ "alto nível, como :func:`asyncio.run`, e devem raramente precisar fazer "
67
+ "referência ao objeto de loop ou chamar seus métodos. Esta seção destina-se "
68
+ "principalmente a autores de código de baixo nível, bibliotecas e frameworks, "
69
+ "que precisam de um controle mais preciso sobre o comportamento do laço de "
70
+ "evento."
65
71
66
72
#: ../../library/asyncio-eventloop.rst:26
67
73
msgid "Obtaining the Event Loop"
@@ -72,55 +78,76 @@ msgid ""
72
78
"The following low-level functions can be used to get, set, or create an "
73
79
"event loop:"
74
80
msgstr ""
81
+ "As seguintes funções baixo nível podem ser usadas para obter, definir, ou "
82
+ "criar um laço de eventos:"
75
83
76
84
#: ../../library/asyncio-eventloop.rst:32
77
85
msgid "Return the running event loop in the current OS thread."
78
86
msgstr ""
87
+ "Retorna o laço de eventos em execução na thread atual do sistema operacional."
79
88
80
89
#: ../../library/asyncio-eventloop.rst:34
81
90
msgid ""
82
91
"If there is no running event loop a :exc:`RuntimeError` is raised. This "
83
92
"function can only be called from a coroutine or a callback."
84
93
msgstr ""
94
+ "Se não existir nenhum laço de eventos em execução, um :exc:`RuntimeError` é "
95
+ "levantado. Esta função somente pode ser chamada a partir de uma corrotina ou "
96
+ "uma função de retorno."
85
97
86
98
#: ../../library/asyncio-eventloop.rst:41
87
99
msgid "Get the current event loop."
88
- msgstr ""
100
+ msgstr "Obtém o laço de eventos atual. "
89
101
90
102
#: ../../library/asyncio-eventloop.rst:43
91
103
msgid ""
92
104
"If there is no current event loop set in the current OS thread, the OS "
93
105
"thread is main, and :func:`set_event_loop` has not yet been called, asyncio "
94
106
"will create a new event loop and set it as the current one."
95
107
msgstr ""
108
+ "Se não existe nenhum laço de eventos definido na thread atual do sistema "
109
+ "operacional, é a thread principal do sistema operacional, e :func:"
110
+ "`set_event_loop` ainda não foi chamada, asyncio irá criar um novo laço de "
111
+ "eventos e defini-lo como o atual."
96
112
97
113
#: ../../library/asyncio-eventloop.rst:48
98
114
msgid ""
99
115
"Because this function has rather complex behavior (especially when custom "
100
116
"event loop policies are in use), using the :func:`get_running_loop` function "
101
117
"is preferred to :func:`get_event_loop` in coroutines and callbacks."
102
118
msgstr ""
119
+ "Devido ao fato desta função ter um comportamento particularmente complexo "
120
+ "(especialmente quando políticas de laço de eventos customizadas estão sendo "
121
+ "usadas), usar a função :func:`get_running_loop` é preferido ao invés de :"
122
+ "func:`get_event_loop` em corrotinas e funções de retorno."
103
123
104
124
#: ../../library/asyncio-eventloop.rst:53
105
125
msgid ""
106
126
"Consider also using the :func:`asyncio.run` function instead of using lower "
107
127
"level functions to manually create and close an event loop."
108
128
msgstr ""
129
+ "Considere também usar a função :func:`asyncio.run` ao invés de usar funções "
130
+ "de baixo nível para manualmente criar e fechar um laço de eventos."
109
131
110
132
#: ../../library/asyncio-eventloop.rst:58
111
133
msgid "Set *loop* as a current event loop for the current OS thread."
112
134
msgstr ""
135
+ "Define *loop* como o laço de eventos atual para a thread atual do sistema "
136
+ "operacional."
113
137
114
138
#: ../../library/asyncio-eventloop.rst:62
115
139
msgid "Create a new event loop object."
116
- msgstr ""
140
+ msgstr "Cria um novo objeto de laço de eventos. "
117
141
118
142
#: ../../library/asyncio-eventloop.rst:64
119
143
msgid ""
120
144
"Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`, "
121
145
"and :func:`new_event_loop` functions can be altered by :ref:`setting a "
122 146
"custom event loop policy <asyncio-policies>`."
123
147
msgstr ""
148
+ "Perceba que o comportamento das funções :func:`get_event_loop`, :func:"
149
+ "`set_event_loop`, e :func:`new_event_loop` podem ser alteradas :ref:"
150
+ "`definindo uma política de laço de eventos customizada <asyncio-policies>`."
124
151
125
152
#: ../../library/asyncio-eventloop.rst:70
126
153
msgid "Contents"
0 commit comments