Keine Cache-Version


Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.

Rechercher une fonction PHP

parallel\run

(1.0.0)

parallel\runExecution

Beschreibung

parallel\run ( Closure $task ) : ?Future

Shall schedule task for execution in parallel.

parallel\run ( Closure $task , array $argv ) : ?Future

Shall schedule task for execution in parallel, passing argv at execution time.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Automatic Scheduling

If a \parallel\Runtime internally created and cached by a previous call to parallel\run() is idle, it will be used to execute the task. If no \parallel\Runtime is idle parallel will create and cache a \parallel\Runtime.

Hinweis:

\parallel\Runtime objects created by the programmer are not used for automatic scheduling.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Parameter-Liste

task

A Closure with specific characteristics.

argv

An array of arguments with specific characteristics to be passed to task at execution time.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Task Characteristics

Closures scheduled for parallel execution must not:

  • accept or return by reference
  • accept or return internal objects (see notes)
  • execute a limited set of instructions

Instructions prohibited in Closures intended for parallel execution are:

  • yield
  • use by-reference
  • declare class
  • declare named function

Hinweis:

Nested closures may yield or use by-reference, but must not contain class or named function declarations.

Hinweis:

No instructions are prohibited in the files which the task may include.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Arguments Characteristics

Arguments must not:

  • contain references
  • contain resources
  • contain internal objects (see notes)

Hinweis:

In the case of file stream resources, the resource will be cast to the file descriptor and passed as int where possible, this is unsupported on Windows.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Internal Objects Notes

Internal objects generally use a custom structure which cannot be copied by value safely, PHP currently lacks the mechanics to do this (without serialization) and so only objects that do not use a custom structure may be shared.

Some internal objects do not use a custom structure, for example parallel\Events\Event and so may be shared.

Closures are a special kind of internal object and support being copied by value, and so may be shared.

Channels are central to writing parallel code and support concurrent access and execution by necessity, and so may be shared.

Warnung

A user class that extends an internal class may use a custom structure as defined by the internal class, in which case they cannot be copied by value safely, and so may not be shared.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Rückgabewerte

Warnung

The return \parallel\Future must not be ignored when the task contains a return or throw statement.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Exceptions

Warnung

Shall throw \parallel\Runtime\Error\Closed if \parallel\Runtime was closed.

Warnung

Shall throw \parallel\Runtime\Error\IllegalFunction if task is a closure created from an internal function.

Warnung

Shall throw \parallel\Runtime\Error\IllegalInstruction if task contains illegal instructions.

Warnung

Shall throw \parallel\Runtime\Error\IllegalParameter if task accepts or argv contains illegal variables.

Warnung

Shall throw \parallel\Runtime\Error\IllegalReturn if task returns illegally.

Finde eine PHP-Funktion

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 30/01/2003, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/php-rf-parallel.run.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : http://php.net

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut