[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-dev
Subject:    Re: [PECL-DEV] threads extension
From:       Andrey Hristov <php () hristov ! com>
Date:       2007-08-17 10:54:44
Message-ID: 46C57E74.2000502 () hristov ! com
[Download RAW message or body]

 Hi,
if I recall right from my experiments with pthreads on C level inside an
extension and memory allocated from Zend, there are problems. Zend, in
debug mode, checks if the memory has been allocated by the same thread,
that's for the e* family of functions. One gets tons of messages and has
to resolve to the libc allocator to be able to share data between threads.

Andrey


Alan Knowles wrote:
> Alexey Zakhlestin wrote:
>> I want to get answers:
>> how well did the code in CVS work?
>>   
> from what I remember:
> - thread include almost worked, although was a bit buggy in terms of
> rejoining at exit.
>> were there any technical problems which original authors couldn't
>> solve at that time?
>>   
> The whole issue of passing data between threads, and the fact that it
> behaves completely differently to how you would expect threads to work
> (eg. shared resources, etc.). Made the thing rather pointless..  Most of
> this would be next to impossible to solve, given PHP's core design.
> 
> You would need to significantly redesign the core engine to do things like:
> - Fixed, flat, simple opcode store, that did not store any context
> information.
> - Scopes that could be accessed in a simple way, and locked etc.
> 
> Hope this gives you a flavor of the issues..
> Regards
> Alan
>> after that I will be ready to ask for CVS account and start working. :)
>>
>> On 8/14/07, Antony Dovgal <antony@zend.com> wrote:
>>  
>>> On 14.08.2007 22:30, Alexey Zakhlestin wrote:
>>>    
>>>> Maybe it wasn't†¦ But there are:
>>>> 1) GUI programms written in PHP (GTK+)
>>>> 2) Net-harvesters written in PHP (a lot of hand-made ones)
>>>> 3) HTTP-server written in PHP (Nanoweb)
>>>>
>>>> etc.
>>>>
>>>> All of these would benefit from threads
>>>>       
>>> I don't really understand what you're trying to prove here.
>>> Do _YOU_ need it? If yes, then start working on it.
>>> Or do you want someone else to do it for you?
>>>
>>> -- 
>>> Wbr,
>>> Antony Dovgal
>>>
>>>     
>>
>>
>>   
> 

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic