@Override
public void run()
{
try {
final String result = doTransform(job.tmpl, job.src, job.params);
runtime.enqueueTask(new ScriptTask()
{
@Override
public void execute(Context cx, Scriptable scope)
{
availableSlots++;
scheduleJobs();
job.callback.call(cx, job.callback, XmlWrapImpl.this, new Object[]{
Undefined.instance, result});
}
});
} catch (final NodeOSException nse) {
runtime.enqueueTask(new ScriptTask()
{
@Override
public void execute(Context cx, Scriptable scope)
{
availableSlots++;