Что такое wait windows

Что такое wait windows

Объектно-ориентированный и процедурный язык программирования систем управления реляционными базами данных, разработанный корпорацией Microsoft.

Новости

Visual FoxPro 9 позволяет создавать ещё более производительные приложения баз данных. Двадцатиление FoxPro! Microsoft принимает поздравления. Visual FoxPro Toolkit for .NET — более 225 функций VFP 7.0, для языков .NET (подробнее)

Команда WAIT

Выдает сообщение и приостанавливает работу Visual FoxPro до тех пор, пока не удет нажата какая-либо клавиша или кнопка мыши.

WAIT
[ cMessageText ]
[TO MemVarName ]
[WINDOW [AT nRow , nColumn ]]
[NOWAIT]
[CLEAR | NOCLEAR]
[TIMEOUT nSeconds ]

Задает сообщение, которое следует отобразить. Если аргумент cMessageText опущен, Visual FoxPro по умолчанию выдает сообщение. Если cMessageText является пустой строкой (»), то сообщение об ошибке не отображается, а Visual FoxPro ждет до тех пор, пока не будет нажата клавиша для продолжения выполне ия программы.

Сохраняет нажатую клавишу в переменной памяти или в элементе массива. Если в качестве MemVarName задана несуществующая переменная памяти или элемент массива, такая переменная или элемент массива создается. Если вы нажали клавишу Enter , непечатаемую клавишу, комбинацию клавиш или кнопку мыши, под именем MemVarName сохраняется пустая строка.

Выдает сообщение в окне системных сообщений, расположенном в правом верхнем уг у основного окна Visual FoxPro. Это окно можно временно скрыть, нажав клавишу Ctrl или Shift .

В FoxPro для MS-DOS вы можете переместить это окно в другое место основного ок а мышью или нажав клавиши Ctrl + F7 .

В FoxPro версии 2.5 и более поздних команда WAIT WINDOW поддерживает многост очные сообщения. Вы можете перенести часть сообщения на следующую строку, поставив в тексте cMessageText возврат каретки (CHR(13)). Окно сообщений автоматически расширяется по мере появления новых строк. Например, окно сообщения из двух строк можно создать с помощью следующей команды:

WAIT WINDOW «This is the 1st line» + CHR(13) + ;

«This is the 2nd line»

Ширина окна сообщения регулируется таким образом, чтобы окно вместило самую д инную строку сообщения. Все строки в сообщении выравниваются по левому краю ок а сообщений. Символы перевода строки (CHR(10)), следующие за символом CHR(13), игнорируются.

AT nRow , nColumn

В Visual FoxPro задает позицию окна сообщений на экране.

Продолжает выполнение программы сразу после выдачи сообщения на экран. Прог амма не дожидается, когда сообщение будет убрано из основного окна Visual FoxPro, а продолжает выполняться со строки, непосредственно следующей за строкой с командой WAIT NOWAIT. Если предложение NOWAIT опущено, выполнение программы п иостанавливается до тех пор, пока сообщение не будет удалено из основного окна Visual FoxPro нажатием клавиши или кнопки мыши.

Удаляет системное окно Visual FoxPro или окно сообщений WAIT из основного окна Visual FoxPro по команде из программы. Например, если воспользоваться командой SET TALK WINDOW, то в системное окно Visual FoxPro будет направляться выдача и формации о ходе индексирования, сортировки и т.п. Это окно можно удалить в диа оговом режиме, нажав какую-либо клавишу или сместив мышь; но то же самое можно сделать из программы, выдав команду WAIT CLEAR.

Указывает, что окно сообщений WAIT остается в основном окне Visual FoxPro до тех пор, пока не будет выдана команда WAIT CLEAR или еще одна команда WAIT WINDOW или пока не появится системное сообщение Visual FoxPro.

Задает интервал времени в секундах, в течение которого можно ждать ввода с к авиатуры или от мыши, пока команда WAIT не будет прекращена. nSeconds задает число секунд (допускаются доли секунды). Если TIMEOUT не последнее предложение команды WAIT, Visual FoxPro генерирует сообщение об ошибке синтаксиса.

Wait Functions

Wait functions allow a thread to block its own execution. The wait functions do not return until the specified criteria have been met. The type of wait function determines the set of criteria used. When a wait function is called, it checks whether the wait criteria have been met. If the criteria have not been met, the calling thread enters the wait state until the conditions of the wait criteria have been met or the specified time-out interval elapses.

Читайте также:  Windows 10 исчез калькулятор

Single-object Wait Functions

The SignalObjectAndWait, WaitForSingleObject, and WaitForSingleObjectEx functions require a handle to one synchronization object. These functions return when one of the following occurs:

  • The specified object is in the signaled state.
  • The time-out interval elapses. The time-out interval can be set to INFINITE to specify that the wait will not time out.

The SignalObjectAndWait function enables the calling thread to atomically set the state of an object to signaled and wait for the state of another object to be set to signaled.

Multiple-object Wait Functions

The WaitForMultipleObjects, WaitForMultipleObjectsEx, MsgWaitForMultipleObjects, and MsgWaitForMultipleObjectsEx functions enable the calling thread to specify an array containing one or more synchronization object handles. These functions return when one of the following occurs:

  • The state of any one of the specified objects is set to signaled or the states of all objects have been set to signaled. You control whether one or all of the states will be used in the function call.
  • The time-out interval elapses. The time-out interval can be set to INFINITE to specify that the wait will not time out.

The MsgWaitForMultipleObjects and MsgWaitForMultipleObjectsEx function allow you to specify input event objects in the object handle array. This is done when you specify the type of input to wait for in the thread’s input queue. For example, a thread could use MsgWaitForMultipleObjects to block its execution until the state of a specified object has been set to signaled and there is mouse input available in the thread’s input queue. The thread can use the GetMessage or PeekMessageA or PeekMessageW function to retrieve the input.

When waiting for the states of all objects to be set to signaled, these multiple-object functions do not modify the states of the specified objects until the states of all objects have been set signaled. For example, the state of a mutex object can be signaled, but the calling thread does not get ownership until the states of the other objects specified in the array have also been set to signaled. In the meantime, some other thread may get ownership of the mutex object, thereby setting its state to nonsignaled.

When waiting for the state of a single object to be set to signaled, these multiple-object functions check the handles in the array in order starting with index 0, until one of the objects is signaled. If multiple objects become signaled, the function returns the index of the first handle in the array whose object was signaled.

Alertable Wait Functions

The MsgWaitForMultipleObjectsEx, SignalObjectAndWait, WaitForMultipleObjectsEx, and WaitForSingleObjectEx functions differ from the other wait functions in that they can optionally perform an alertable wait operation. In an alertable wait operation, the function can return when the specified conditions are met, but it can also return if the system queues an I/O completion routine or an APC for execution by the waiting thread. For more information about alertable wait operations and I/O completion routines, see Synchronization and Overlapped Input and Output. For more information about APCs, see Asynchronous Procedure Calls.

Registered Wait Functions

The RegisterWaitForSingleObject function differs from the other wait functions in that the wait operation is performed by a thread from the thread pool. When the specified conditions are met, the callback function is executed by a worker thread from the thread pool.

By default, a registered wait operation is a multiple-wait operation. The system resets the timer every time the event is signaled (or the time-out interval elapses) until you call the UnregisterWaitEx function to cancel the operation. To specify that a wait operation should be executed only once, set the dwFlags parameter of RegisterWaitForSingleObject to WT_EXECUTEONLYONCE.

If the thread calls functions that use APCs, set the dwFlags parameter of RegisterWaitForSingleObject to WT_EXECUTEINPERSISTENTTHREAD.

Waiting on an Address

A thread can use the WaitOnAddress function to wait for the value of a target address to change from some undesired value to any other value. This enables threads to wait for a value to change without having to spin or handle the synchronization problems that can arise when the thread captures an undesired value but the value changes before the thread can wait.

Читайте также:  Linux который не грузит систему

WaitOnAddress returns when code that modifies the target value signals the change by calling WakeByAddressSingle to wake a single waiting thread or WakeByAddressAll to wake all waiting threads. If a time-out interval is specified with WaitOnAddress and no thread calls a wake function, the function returns when the time-out interval elapses. If no time-out interval is specified, the thread waits indefinitely.

Wait Functions and Time-out Intervals

The accuracy of the specified time-out interval depends on the resolution of the system clock. The system clock «ticks» at a constant rate. If the time-out interval is less than the resolution of the system clock, the wait may time out in less than the specified length of time. If the time-out interval is greater than one tick but less than two, the wait can be anywhere between one and two ticks, and so on.

To increase the accuracy of the time-out interval for the wait functions, call the timeGetDevCaps function to determine the supported minimum timer resolution and the timeBeginPeriod function to set the timer resolution to its minimum. Use caution when calling timeBeginPeriod, as frequent calls can significantly affect the system clock, system power usage, and the scheduler. If you call timeBeginPeriod, call it one time early in the application and be sure to call the timeEndPeriod function at the very end of the application.

Wait Functions and Synchronization Objects

The wait functions can modify the states of some types of synchronization objects. Modification occurs only for the object or objects whose signaled state caused the function to return. Wait functions can modify the states of synchronization objects as follows:

  • The count of a semaphore object decreases by one, and the state of the semaphore is set to nonsignaled if its count is zero.
  • The states of mutex, auto-reset event, and change-notification objects are set to nonsignaled.
  • The state of a synchronization timer is set to nonsignaled.
  • The states of manual-reset event, manual-reset timer, process, thread, and console input objects are not affected by a wait function.

Wait Functions and Creating Windows

You have to be careful when using the wait functions and code that directly or indirectly creates windows. If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. If you have a thread that uses a wait function with no time-out interval, the system will deadlock. Two examples of code that indirectly creates windows are DDE and the CoInitialize function. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than the other wait functions.

wait (команда)

wait — встроенная команда консольной оболочки Bash. Ждёт завершения указанного процесса и возвращает статус его завершения.

Использование

где n может быть идентификатором процесса или спецификацией задания. Если указана спецификация задания, ждёт завершения всех процессов в конвейере соответствующего задания. Если n не указано, ожидается завершение всех текущих активных порождённых процессов, и возвращается статус ноль. Если n задаёт идентификатор несуществующего процесса или задания, статус выхода — 127. В противном случае, статусом выхода является статус завершения последнего процесса или задания, завершение которого ждали.

Ссылки

  • wait(1) — страница справки man по пользовательским командам OpenBSD (англ.)
  • wait(1) — страница справки man по пользовательским командам FreeBSD (англ.)
Команды Unix
POSIX.1-2008
Утилиты POSIX.1-2008 admin • alias • ar • asa • at • awk • basename • batch • bc • bg • c99 • cal • cat • cd • cflow • chgrp • chmod • chown • cksum • cmp • comm • command • compress • cp • crontab • csplit • ctags • cut • cxref • date • dd • delta • df • diff • dirname • du • echo • ed • env • ex • expand • expr • false • fc • fg • file • find • fold • fort77 • fuser • gencat • get • getconf • getopts • grep • hash • head • iconv • id • ipcrm • ipcs • jobs • join • kill • lex • link • ln • locale • localedef • logger • logname • lp • ls • m4 • mailx • make • man • mesg • mkdir • mkfifo • more • mv • newgrp • nice • nl • nm • nohup • od • paste • patch • pathchk • pax • pr • printf • prs • ps • pwd • qalter • qdel • qhold • qmove • qmsg • qrerun • qrls • qselect • qsig • qstat • qsub • read • renice • rm • rmdel • rmdir • sact • sccs • sed • sh • sleep • sort • split • strings • strip • stty • tabs • tail • talk • tee • test • time • touch • tput • tr • true • tsort • tty • type • ulimit • umask • unalias • uname • uncompress • unexpand • unget • uniq • unlink • uucp • uudecode • uuencode • uustat • uux • val • vi • wait • wc • what • who • write • xargs • yacc • zcat
GNU Coreutils
Файловые утилиты chgrp • chown • chmod • cp • dd • df • dir • dircolors • install • ln • ls • mkdir • mkfifo • mknod • mv • rm • rmdir • shred • sync • touch • vdir
Текстовые утилиты cat • cksum • comm • csplit • cut • expand • fmt • fold • head • join • md5sum • nl • od • paste • ptx • pr • sha1sum • sort • split • sum • tac • tail • tr • tsort • unexpand • uniq • wc
Shell-утилиты basename • chroot • date • dirname • du • echo • env • expr • factor • false • groups • hostid • id • link • logname • nice • nohup • pathchk • pinky • printenv • printf • pwd • readlink • seq • sleep • stat • stty • tee • test • true • tty • uname • unlink • users • who • whoami • yes
Читайте также:  Liveusb linux для восстановления

Wikimedia Foundation . 2010 .

Смотреть что такое «wait (команда)» в других словарях:

History (команда в UNIX) — У этого термина существуют и другие значения, см. History. history команда в Unix системах, которая позволяет просмотреть историю работы (а именно последние 100 действий) пользователя с командной строкой. Доступна только в csh и является… … Википедия

cd (команда) — У этого термина существуют и другие значения, см. CD (значения). cd, в DOS/Windows также доступная как chdir (англ. change directory изменить каталог) команда командной строки для изменения текущего рабочего каталога в Unix, DOS… … Википедия

As (команда) — У этого термина существуют и другие значения, см. As. as команда ассемблера в операционных системах Unix. Синтаксис: as filename.s В Solaris 10 as находится в /usr/ccs/bin/. См. также gas ассемблер GNU Ссылки Assembly Language Techniques for the… … Википедия

TTY-абстракция — Стиль этой статьи неэнциклопедичен или нарушает нормы русского языка. Статью следует исправить согласно стилистическим правилам Википедии. У этого термина существуют и другие значения, см. Tty. Подсистема TTY, или TTY абстракция это одна из … Википедия

Perl — Семантика: мультипарадигменный: императивный, объектно ориентированный, функциональный Тип исполнения: интерпретатор Появился в: 1987 Автор(ы) … Википедия

Список американских телепрограмм по дате начала показа — Содержание 1 2010 е 1.1 2011 1.1.1 Январь 1.1.2 Февраль … Википедия

Call of Duty: Modern Warfare 3 — Call of Duty Modern Warfare 3 Обложка игры Разработчик Infini … Википедия

Rancid — в Ventura, Ca 24 сент 2008г … Википедия

Список эпизодов телесериала «Доктор Хаус» — Основная статья: Доктор Хаус … Википедия

Sonic Adventure — Обложка североамериканского издания игры для консоли Dreamcast, выпущенного под лейблом Sega All Stars в 2000 году Разработчики Sonic Team Sonic Team USA (международная) NOW Production[1] … Википедия

Оцените статью