Call from main thread. Initiate a request for more environments

def allocate(self, handles, initial=False, params={}):
        """Call from main thread. Initiate a request for more environments"""
        assert all(re.search('^\d+$', h) for h in handles), "All handles must be numbers: {}".format(handles)
        self.requests.put(('allocate', (handles, initial, params)))