Pre-cog source doubt

I was looking at the source of pre-cog and there is this piece of code
which i am not able to locate ( pmt_mgr() ) in the documentation.

self.mgr = pmt.pmt_mgr()
for i in range(64):
blob = self.mgr.acquire(True )

There is no reference of pmt_mgr in documentation. Can somebody
expalain its operation or point to relevant docs.


Okay I found in older grextras (


  •  Manage a collection of PMTs -> memory wise
  • When a PMT reference count becomes zero, the pmt and contents is
  • With a manager, the PMT will not be deleted, but released to the
  • Then, the PMT can be acquired again for re-use by the user.
  • This offers 2 benefits:
    • Avoids expensive memory allocation overhead (re-use is key)
    • An upstream producer can block until resources become released