[Bug 1033630] Re: GLib.ThreadPool is not usuable in PyGObject

Martin Pitt martin.pitt at ubuntu.com
Mon Sep 17 12:31:18 UTC 2012


** Package changed: pygobject (Ubuntu) => glib2.0 (Ubuntu)

** Bug watch added: GNOME Bug Tracker #683941
   https://bugzilla.gnome.org/show_bug.cgi?id=683941

** Also affects: glib via
   https://bugzilla.gnome.org/show_bug.cgi?id=683941
   Importance: Unknown
       Status: Unknown

** Changed in: glib2.0 (Ubuntu)
       Status: New => Triaged

** Changed in: glib2.0 (Ubuntu)
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glib2.0 in Ubuntu.
https://bugs.launchpad.net/bugs/1033630

Title:
  GLib.ThreadPool is not usuable  in PyGObject

Status in The "G" Library - GLib:
  Unknown
Status in “glib2.0” package in Ubuntu:
  Triaged

Bug description:
  GLib.ThreadPool is not usuable  in PyGObject as there is no way to set
  the function used with the threads:

  Unlike documented in the GLib Reference Manual the constructor doesn't
  take any arguments:

  >>> from gi.repository import GLib
  >>> pool = GLib.ThreadPool(lambda *args: id(0), -1 , False)
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: function takes at most 0 arguments (3 given)

  
  GLib.ThreadPool has a variable 'func' but reading it results in an error:

  >>> pool = GLib.ThreadPool()
  >>> pool.func

  ** (process:11679): WARNING **: Field func: Interface type 2 should have is_pointer set
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  RuntimeError: unable to get the value

  
  Setting it crashes the application:

  >>> pool.func = lambda *args: id(0)
  **
  ERROR:/build/buildd/pygobject-3.2.2/gi/pygi-argument.c:1029:_pygi_argument_from_object: code should not be reached
  [1]    11679 abort (core dumped)  python

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: python-gi 3.2.2-1~precise
  ProcVersionSignature: Ubuntu 3.2.0-27.43-generic-pae 3.2.21
  Uname: Linux 3.2.0-27-generic-pae i686
  NonfreeKernelModules: nvidia
  ApportVersion: 2.0.1-0ubuntu11
  Architecture: i386
  Date: Mon Aug  6 21:14:15 2012
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
  SourcePackage: pygobject
  UpgradeStatus: Upgraded to precise on 2012-04-04 (123 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/glib/+bug/1033630/+subscriptions




More information about the foundations-bugs mailing list