Hold Pulse's mainloop lock while calling capture functions