Skip to content

Commit 5a28b01

Browse files
committed
Merge pull request kivy#2670 from kivy/mainthread_doc
Mainthread decorator doc revision, fixes kivy#2652
2 parents 06b8845 + 2ccaafc commit 5a28b01

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kivy/clock.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,8 @@ def _process_events_before_frame(self):
641641

642642

643643
def mainthread(func):
644-
'''Decorator that will schedule the call of the function in the
645-
mainthread. It can be useful when you use
644+
'''Decorator that will schedule the call of the function for the next
645+
available frame in the mainthread. It can be useful when you use
646646
:class:`~kivy.network.urlrequest.UrlRequest` or when you do Thread
647647
programming: you cannot do any OpenGL-related work in a thread.
648648
@@ -651,8 +651,8 @@ def mainthread(func):
651651
652652
@mainthread
653653
def callback(self, *args):
654-
print('The request succedded!'
655-
'This callback is call in the main thread')
654+
print('The request succedded!',
655+
'This callback is called in the main thread.')
656656
657657
self.req = UrlRequest(url='http://...', on_success=callback)
658658

0 commit comments

Comments
 (0)