Show More
@@ -1675,7 +1675,7 b' Currently the magic system has the following functions:\\n"""' | |||
|
1675 | 1675 | exit_ignore=exit_ignore) |
|
1676 | 1676 | t1 = clock2() |
|
1677 | 1677 | t_usr = t1[0]-t0[0] |
|
1678 |
t_sys = t1[1]-t |
|
|
1678 | t_sys = t1[1]-t0[1] | |
|
1679 | 1679 | print "\nIPython CPU timings (estimated):" |
|
1680 | 1680 | print " User : %10s s." % t_usr |
|
1681 | 1681 | print " System: %10s s." % t_sys |
@@ -1687,7 +1687,7 b' Currently the magic system has the following functions:\\n"""' | |||
|
1687 | 1687 | exit_ignore=exit_ignore) |
|
1688 | 1688 | t1 = clock2() |
|
1689 | 1689 | t_usr = t1[0]-t0[0] |
|
1690 |
t_sys = t1[1]-t |
|
|
1690 | t_sys = t1[1]-t0[1] | |
|
1691 | 1691 | print "\nIPython CPU timings (estimated):" |
|
1692 | 1692 | print "Total runs performed:",nruns |
|
1693 | 1693 | print " Times : %10s %10s" % ('Total','Per run') |
@@ -292,17 +292,19 b' if HAS_CTYPES:' | |||
|
292 | 292 | """raises the exception, performs cleanup if needed""" |
|
293 | 293 | if not inspect.isclass(exctype): |
|
294 | 294 | raise TypeError("Only types can be raised (not instances)") |
|
295 | res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, | |
|
295 | # Explicit cast to c_long is necessary for 64-bit support: | |
|
296 | # See https://bugs.launchpad.net/ipython/+bug/237073 | |
|
297 | res = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), | |
|
296 | 298 | ctypes.py_object(exctype)) |
|
297 | 299 | if res == 0: |
|
298 | 300 | raise ValueError("invalid thread id") |
|
299 | 301 | elif res != 1: |
|
300 |
# |
|
|
301 |
# and you should call it again with exc=NULL to revert the effect |
|
|
302 | # If it returns a number greater than one, you're in trouble, | |
|
303 | # and you should call it again with exc=NULL to revert the effect | |
|
302 | 304 | ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, 0) |
|
303 | 305 | raise SystemError("PyThreadState_SetAsyncExc failed") |
|
304 | 306 | |
|
305 |
def sigint_handler |
|
|
307 | def sigint_handler(signum,stack_frame): | |
|
306 | 308 | """Sigint handler for threaded apps. |
|
307 | 309 | |
|
308 | 310 | This is a horrible hack to pass information about SIGINT _without_ |
@@ -321,7 +323,7 b' if HAS_CTYPES:' | |||
|
321 | 323 | Term.cout.flush() |
|
322 | 324 | |
|
323 | 325 | else: |
|
324 |
def sigint_handler |
|
|
326 | def sigint_handler(signum,stack_frame): | |
|
325 | 327 | """Sigint handler for threaded apps. |
|
326 | 328 | |
|
327 | 329 | This is a horrible hack to pass information about SIGINT _without_ |
@@ -248,7 +248,7 b' class BackgroundJobManager:' | |||
|
248 | 248 | self._update_status() |
|
249 | 249 | new_comp = self._group_report(self._comp_report,'Completed') |
|
250 | 250 | new_dead = self._group_report(self._dead_report, |
|
251 | 'Dead, call job.traceback() for details') | |
|
251 | 'Dead, call jobs.traceback() for details') | |
|
252 | 252 | self._comp_report[:] = [] |
|
253 | 253 | self._dead_report[:] = [] |
|
254 | 254 | return new_comp or new_dead |
@@ -340,7 +340,7 b' class BackgroundJobBase(threading.Thread):' | |||
|
340 | 340 | stat_created = 'Created'; stat_created_c = 0 |
|
341 | 341 | stat_running = 'Running'; stat_running_c = 1 |
|
342 | 342 | stat_completed = 'Completed'; stat_completed_c = 2 |
|
343 | stat_dead = 'Dead (Exception), call job.traceback() for details' | |
|
343 | stat_dead = 'Dead (Exception), call jobs.traceback() for details' | |
|
344 | 344 | stat_dead_c = -1 |
|
345 | 345 | |
|
346 | 346 | def __init__(self): |
@@ -391,7 +391,7 b' class BackgroundJobBase(threading.Thread):' | |||
|
391 | 391 | self.status = BackgroundJobBase.stat_dead |
|
392 | 392 | self.stat_code = BackgroundJobBase.stat_dead_c |
|
393 | 393 | self.finished = None |
|
394 | self.result = ('<BackgroundJob died, call job.traceback() for details>') | |
|
394 | self.result = ('<BackgroundJob died, call jobs.traceback() for details>') | |
|
395 | 395 | self._tb = self._make_tb() |
|
396 | 396 | else: |
|
397 | 397 | self.status = BackgroundJobBase.stat_completed |
General Comments 0
You need to be logged in to leave comments.
Login now