Новые книги

With this practical book, you will attain a solid understanding of threads and will discover how to put this powerful mode of programming to work in real-world applications.

The primary advantage of threaded programming is that it enables your applications to accomplish more than one task at the same time by using the number-crunching power of multiprocessor parallelism and by automatically exploiting I/O concurrency in your code, even on a single processor machine. The result: applications that are faster, more responsive to users, and often easier to maintain. Threaded programming is particularly well suited to network programming where it helps alleviate the bottleneck of slow network I/O.

This book offers an in-depth description of the IEEE operating system interface standard, POSIX (Portable Operating System Interface) threads, commonly called Pthreads. Written for experienced C programmers, but assuming no previous knowledge of threads, the book explains basic concepts such as asynchronous programming, the lifecycle of a thread, and synchronization. You then move to more advanced topics such as attributes objects, thread-specific data, and realtime scheduling. An entire chapter is devoted to "real code," with a look at barriers, read/write locks, the work queue manager, and how to utilize existing libraries. In addition, the book tackles one of the thorniest problems faced by thread programmers-debugging-with valuable suggestions on how to avoid code errors and performance problems from the outset.

Numerous annotated examples are used to illustrate real-world concepts. A Pthreads mini-reference and a look at future standardization are also included.
The first edition of this book started with the words: ‘A modern society could no longer function without the microprocessor.’

This is certainly still true but it is even truer if we include the microcontroller. While the microprocessor is at the heart of our computers, with a great deal of publicity, the microcontroller is quietly running the rest of our world. They share our homes, our vehicles and our workplace, and sing to us from our greetings cards. They are our constant, unseen companions and billions are being installed every year with little or no publicity. The purpose of this book is to give a worry-free introduction to microprocessors and microcontrollers. It starts at the beginning and does not assume any previous knowledge of microprocessors or microcontrollers and, in gentle steps, introduces the knowledge necessary to take those vital first steps into the world of the micro. John Crisp

sesam_settransaction

Учебник РНР
НазадВперёд

sesam_settransaction

(только PHP 3 CVS)

sesam_settransaction - устанавливает параметры транзакции SESAM.

Описание

bool sesam_settransaction (int isolation_level, int read_only)

Возвращает TRUE, если значение правильное и операция settransaction() прошла успешно, иначе FALSE.

sesam_settransaction() переопределяет значения по умолчанию параметров транзакции "isolation level" и "read-only" (которые устанавливаются в файле конфигурации SESAM), чтобы оптимизировать последовательные запросы и гарантировать целостность БД. Переопределённые значения используются только  для следующей транзакции.

sesam_settransaction() может вызываться только до старта транзакции, а не после того как транзакция уже стартовала.

Для упрощения использования в РНР-скриптах были предопределены следующие РНР-константы (см. в руководстве SESAM детальное объяснение семантики):

Таблица 1. Правильные значения параметра "Isolation_Level"
ЗначениеКонстантаСмысл
1 SESAM_TXISOL_READ_UNCOMMITTEDчитать без подтверждения
2 SESAM_TXISOL_READ_COMMITTEDчитать подтверждённую
3 SESAM_TXISOL_REPEATABLE_READповторяемое чтение
4 SESAM_TXISOL_SERIALIZABLEсериализована
Таблица 2. Правильные значения параметра "Read_Only"
ЗначениеКонстантаСмысл
0 SESAM_TXREAD_READWRITERead/Write
1 SESAM_TXREAD_READONLYRead-Only

Значения, установленные функцией sesam_settransaction(), переопределяют значения по умолчанию, специфицированные в файле конфигурации SESAM.

Пример 1. Установка параметров транзакции SESAM
<?php
sesam_settransaction (SESAM_TXISOL_REPEATABLE_READ,
                     SESAM_TXREAD_READONLY);
?>

Назад Оглавление Вперёд
sesam_seek_row ВверхФункции обслуживания сессий