This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
"""emlx.py | |
Class to parse email stored with Apple proprietary emlx format | |
Created by Karl Dubost on 2013-03-30 | |
Inspired by Rui Carmo — https://the.taoofmac.com/space/blog/2008/03/03/2211 | |
MIT License""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
/** | |
* Periodically poll a signal function until either it returns true or a timeout is reached. | |
* | |
* @param signal function that returns true when the polled operation is complete | |
* @param interval time interval between polls in milliseconds | |
* @param timeout period of time before giving up on polling | |
* @returns true if the signal function returned true, false if the operation timed out | |
*/ |