pelican/server/test/src/TestChunker.cpp
/**
 * @details
 * Runs the thread owned by the test chunker.
 */
@details
Runs the thread owned by the test chunker.
@details Runs the thread owned by the test chunker .
void TestChunker::run()
{
    msleep(50);
    unsigned counter = 0;
    unsigned nDoubles = _size / sizeof(double);
    std::vector<double> array(nDoubles);
    while (!_abort)
    {
        if (_device)
        {
            for (unsigned i = 0; i < nDoubles; i++)
                array[i] = counter;
            counter++;
            _device->open(QIODevice::WriteOnly);
            _device->write(reinterpret_cast<char*>(&array[0]), _size);
            _device->close();
        }
        msleep(1);
    }
}
void TestChunker :: run ( ) { msleep ( 50 ) ; unsigned counter = 0 ; unsigned nDoubles = _size / sizeof ( double ) ; std :: vector < double > array ( nDoubles ) ; while ( ! _abort ) { if ( _device ) { for ( unsigned i = 0 ; i < nDoubles ; i ++ ) array [ i ] = counter ; counter ++ ; _device -> open ( QIODevice :: WriteOnly ) ; _device -> write ( reinterpret_cast < char * > ( & array [ 0 ] ) , _size ) ; _device -> close ( ) ; } msleep ( 1 ) ; } }
@details
 Runs the thread owned by the test chunker.
@details Runs the thread owned by the test chunker .
// Run the thread.