001/* 002 * Copyright (c) 2012-2017 Institut National des Sciences Appliquées de Lyon (INSA-Lyon) 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 */ 009 010package gololang.concurrent.workers; 011 012/** 013 * A worker function for asynchronously processing messages. 014 * <p> 015 * This interface is mostly used to facilitate the design of the Java API, as worker functions are made out of 016 * function references in Golo. 017 */ 018public interface WorkerFunction { 019 020 /** 021 * Called by a worker executor to process a message. 022 * 023 * @param message the message to process. 024 */ 025 void apply(Object message); 026}