add thread enforcement decorators

This adds a couple of decorators that can be used to
mark functions as needing to be run in the gdb thread
or in the gtk thread.

This found at least one bug.
This commit is contained in:
Tom Tromey
2013-11-03 19:48:27 -07:00
parent ca645d2e80
commit b73212ab30
5 changed files with 36 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2012 Tom Tromey <tom@tromey.com>
# Copyright (C) 2012, 2013 Tom Tromey <tom@tromey.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@ import gui.toplevel
import gui.dprintf
import gui.events
import re
from gui.startup import in_gtk_thread
class GuiCommand(gdb.Command):
def __init__(self):