# -*- coding: utf-8 -*-


class Async(object):
    """
    Interface with the worker pool super-system.
    """
    COMPLETE = 0
    ABORTED = 1
    QUEUED = 2

    def __init__(self, fn, *args, **kwargs):
        self.fn = fn
        self.result = self.fn(*args, **kwargs)

    @property
    def status(self):
        """
        Checks the result of the called function and returns the appropriate statue code.
        """
        return self.COMPLETE