Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97331 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23815 invoked from network); 7 Dec 2016 22:29:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2016 22:29:54 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.193 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.193 mail-qk0-f193.google.com Received: from [209.85.220.193] ([209.85.220.193:35681] helo=mail-qk0-f193.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/21-11772-16D88485 for ; Wed, 07 Dec 2016 17:29:53 -0500 Received: by mail-qk0-f193.google.com with SMTP id n204so50588399qke.2 for ; Wed, 07 Dec 2016 14:29:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=rU8y1Ebg01Flqy9qs078GRnuPM5T6p0KiIYi/RgtYfY=; b=FREwg7Ze6ZVVARNj66kGVu7aPn0EJOMqzy8Iip/yu74GpvNwWG2eYCIB4aCVvq/S6W 5q45i+fKrfjMpLfTXbu+DDQvxtJ41DoeLdDh0f2rwuIbh4B8gOfs2CqF7fkiARXGETEe gpNOe/U8XXvw2VmO+QyXFDaoYkQctMSyOfK4iIMtuGLslNION2jy9NIHnAlNKVJvTCBj OEIaUBwiwnTggNl/Lh5G/YuB5ZIG+82JYta8vAmfd0uMVxkypLT35qt02FRrIsdQfqrb PY3iaMfZwot7uTgqLo43mopjU87GK7N7vicaALy2lhfhEsZRRBXxBWeN0mSD2g3sPNat /g1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=rU8y1Ebg01Flqy9qs078GRnuPM5T6p0KiIYi/RgtYfY=; b=BMOh5PKdzGxk8+Vt5F2nfOO9u4LaqEpqNf3vPnvXJLF9DBEgpmPuMxVbNeSLvZoLCI y5pgOi1ZYr/lDbeZfzy8uAnA7szjcvYOn7JkRGKngSAmsGsHls5y7zSfqXRwIAlD8eiC Xy/WL7Od58yWG3twMYq7c/VDSaUTPRshA139/HgrDe/TVKSASCR2YRKIBNFt6eZUpb2e OVe6f5aB8gnVcipQmG+9+/gVG6xtRy8xuTrBCWiSnlCil2qirXpNWFuzN8tIgsMSdIKo jjwC1g67wj00UHThZSWkEjaS2i4VYH1hqiJonLfrWQK78aoziDdAjmdIjPFPcGO9Vgmq +eVg== X-Gm-Message-State: AKaTC01SjP8nYOsts/lPLm/Rl7uXfWQ31lnBiCFx+r4Bs9iF2oBocd77JiRn4S+1IVvk4Q== X-Received: by 10.129.164.68 with SMTP id b65mr63497817ywh.145.1481149790771; Wed, 07 Dec 2016 14:29:50 -0800 (PST) Received: from Stas-Air-9.local (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id d131sm10774921ywe.35.2016.12.07.14.29.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2016 14:29:50 -0800 (PST) To: Anatol Belski , "'simon .barotte'" , internals@lists.php.net References: <00e001d25075$b4e4b990$1eae2cb0$@belski.net> Message-ID: <1caab139-8d73-d4ca-28e5-3ee584fb3e10@gmail.com> Date: Wed, 7 Dec 2016 14:29:49 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <00e001d25075$b4e4b990$1eae2cb0$@belski.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Use pthread in php extension From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Of course you can link your extension with any possible library. > Particularly with pthreads, when PHP is compiled non thread safe, you > need to be very careful using the PHP APIs. Many will be not thread > safe in that case. Best strategy were probably not using PHP APIs in > the thread callbacks at all. Besides that, many libraries (e.g. ICU4C) have either non-thread-safe parts (e.g. functions with global state) or special actions need to be performed to use them in thread-safe manner, which PHP will not perform when built in non-ZTS mode. So you need to be careful with third-party libraries too. -- Stas Malyshev smalyshev@gmail.com