Re: NET::LDAP->new( async => 1)
Chris Ridd via perl-ldap <[email protected]> Tue, 25 Oct 2022 12:23:25 +0100
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_D5F8EEDD-0AEE-4D47-8F7A-A263ACFE1550 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I couldn=E2=80=99t see any examples either. However, if you look at the = tests in the sources you=E2=80=99ll find a couple of very simple = examples. Eg. https://github.com/perl-ldap/perl-ldap/blob/master/t/60cancel.t There=E2=80=99s another in = https://github.com/perl-ldap/perl-ldap/blob/master/t/04refloop.t but it = doesn=E2=80=99t look helpful to me. Remember you can always submit operations in parallel out of the box, = without doing anything special. The only blocking comes when you want to = check the results. $res1 =3D $ldap->modify(=E2=80=9Cuid=3Duser.0,ou=3Dpeople,dc=3Dexample,dc=3D= com=E2=80=9D, [=E2=80=A6]); $res2 =3D $ldap->modify(=E2=80=9Cuid=3Duser.1,ou=3Dpeople.dc=3Dexample,dc=3D= com=E2=80=9D, [=E2=80=A6]); # etc If you come up with a good async example, please raise a PR to add it to = Examples.pod, or just add a new file in the contrib directory. Cheers, Chris > On 21 Oct 2022, at 14:07, Stampfl, Burt via perl-ldap = <[email protected]> wrote: >=20 > =20 > =20 > From: Stampfl, Burt <[email protected] = <mailto:[email protected]>>=20 > Sent: Friday, October 21, 2022 7:52 AM > To: [email protected] <mailto:[email protected]> > Cc: Stampfl, Burt <[email protected] = <mailto:[email protected]>> > Subject: NET::LDAP->new( async =3D> 1) > =20 > Hi,=20 > =20 > I am looking for any information I can find (especially examples) of = how to use the =E2=80=98async mode in NET::LDAP. > The metacpan Net::LDAP page tells how to enable it but not how it is = actually supported once enabled. > The I=E2=80=99ve been searching the web for days and still can=E2=80=99t= get this feature working. > Any pointers to documentation and/or examples would be greatly = appreciated. > =20 > Thank you > =20 > Burt Stampfl=20 > AMSC (NASDAQ: AMSC) > W231 N2844 Roundy Circle Suite D, Pewaukee, WI 53072 USA > Work: +1 262.901.6007 > Mobile: +1 847.638.1792 > [email protected] <mailto:[email protected]> > amsc.com <http://www.amsc.com/> > =20 > <image001.jpg> > =20 > "This e-mail message and any attachments are confidential and may be = privileged. If you are not the intended recipient please notify AMSC = immediately by replying to this message or by sending a message to = [email protected] <mailto:[email protected]> and destroy all copies = of this message and any attachments. Thank you." --Apple-Mail=_D5F8EEDD-0AEE-4D47-8F7A-A263ACFE1550 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;">I couldn=E2=80=99= t see any examples either. However, if you look at the tests in the = sources you=E2=80=99ll find a couple of very simple = examples.<div><br></div><div>Eg. <a = href=3D"https://github.com/perl-ldap/perl-ldap/blob/master/t/60cancel.t">h= ttps://github.com/perl-ldap/perl-ldap/blob/master/t/60cancel.t</a></div><d= iv><br></div><div>There=E2=80=99s another in <a = href=3D"https://github.com/perl-ldap/perl-ldap/blob/master/t/04refloop.t">= https://github.com/perl-ldap/perl-ldap/blob/master/t/04refloop.t</a> = but it doesn=E2=80=99t look helpful to = me.</div><div><br></div><div>Remember you can always submit operations = in parallel out of the box, without doing anything special. The only = blocking comes when you want to check the = results.</div><div><br></div><div>$res1 =3D = $ldap->modify(=E2=80=9Cuid=3Duser.0,ou=3Dpeople,dc=3Dexample,dc=3Dcom=E2= =80=9D, [=E2=80=A6]);</div><div>$res2 =3D = $ldap->modify(=E2=80=9Cuid=3Duser.1,ou=3Dpeople.dc=3Dexample,dc=3Dcom=E2= =80=9D, [=E2=80=A6]);</div><div># etc</div><div><br></div><div>If you = come up with a good async example, please raise a PR to add it to = Examples.pod, or just add a new file in the contrib = directory.</div><div><br></div><div>Cheers,</div><div><br></div><div>Chris= </div><div><br></div><div><div><blockquote type=3D"cite"><div>On 21 Oct = 2022, at 14:07, Stampfl, Burt via perl-ldap <[email protected]> = wrote:</div><br class=3D"Apple-interchange-newline"><div><meta = charset=3D"UTF-8"><div class=3D"WordSection1" style=3D"page: = WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; = font-size: 12px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><div style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;"><o:p> </o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, = sans-serif;"><o:p> </o:p></div><div><div style=3D"border-style: = solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, = 225); padding: 3pt 0in 0in;"><div style=3D"margin: 0in; font-size: 11pt; = font-family: Calibri, sans-serif;"><b>From:</b><span = class=3D"Apple-converted-space"> </span>Stampfl, Burt <<a = href=3D"mailto:[email protected]" style=3D"color: rgb(5, 99, 193); = text-decoration: underline;">[email protected]</a>><span = class=3D"Apple-converted-space"> </span><br><b>Sent:</b><span = class=3D"Apple-converted-space"> </span>Friday, October 21, 2022 = 7:52 AM<br><b>To:</b><span class=3D"Apple-converted-space"> </span><a= href=3D"mailto:[email protected]" style=3D"color: rgb(5, 99, = 193); text-decoration: = underline;">[email protected]</a><br><b>Cc:</b><span = class=3D"Apple-converted-space"> </span>Stampfl, Burt <<a = href=3D"mailto:[email protected]" style=3D"color: rgb(5, 99, 193); = text-decoration: = underline;">[email protected]</a>><br><b>Subject:</b><span = class=3D"Apple-converted-space"> </span>NET::LDAP->new( async = =3D> 1)<o:p></o:p></div></div></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, = sans-serif;"><o:p> </o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;">Hi,<span = class=3D"Apple-converted-space"> </span><o:p></o:p></div><div = style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;"><o:p> </o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;">I am looking for any = information I can find (especially examples) of how to use the =E2=80=98as= ync mode in NET::LDAP.<o:p></o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;">The metacpan = Net::LDAP page tells how to enable it but not how it is actually = supported once enabled.<o:p></o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;">The I=E2=80=99ve = been searching the web for days and still can=E2=80=99t get this feature = working.<o:p></o:p></div><div style=3D"margin: 0in; font-size: 11pt; = font-family: Calibri, sans-serif;">Any pointers to documentation and/or = examples would be greatly appreciated.<o:p></o:p></div><div = style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;"><o:p> </o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;">Thank = you<o:p></o:p></div><div style=3D"margin: 0in; font-size: 11pt; = font-family: Calibri, sans-serif;"><o:p> </o:p></div><div = style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;"><b><span lang=3D"ES-CO" style=3D"color: rgb(0, 104, = 161);">Burt Stampfl<span = class=3D"Apple-converted-space"> </span></span></b><span = lang=3D"ES-CO" style=3D"font-size: 4pt; color: rgb(31, 73, = 125);"><o:p></o:p></span></div><div style=3D"margin: 0in; font-size: = 11pt; font-family: Calibri, sans-serif;"><b><span lang=3D"ES-CO" = style=3D"color: rgb(65, 86, 97);">AMSC<span = class=3D"Apple-converted-space"> </span></span></b><span = lang=3D"ES-CO" style=3D"color: rgb(65, 86, 97);">(NASDAQ: = AMSC)</span><span lang=3D"ES-CO" style=3D""><o:p></o:p></span></div><div = style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;"><span lang=3D"EN-GB" style=3D"color: rgb(65, 86, 97);">W231 = N2844 Roundy Circle Suite D, Pewaukee, WI 53072 = USA<o:p></o:p></span></div><div style=3D"margin: 0in; font-size: 11pt; = font-family: Calibri, sans-serif;"><span lang=3D"EN-GB" style=3D"color: = rgb(65, 86, 97);">Work: +1 = 262.901.6007<o:p></o:p></span></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;"><span lang=3D"EN-GB" = style=3D"color: rgb(65, 86, 97);">Mobile: +1 847.638.1792</span><span = style=3D""><o:p></o:p></span></div><div style=3D"margin: 0in; font-size: = 11pt; font-family: Calibri, sans-serif;"><span lang=3D"EN-GB"><a = href=3D"mailto:[email protected]" style=3D"color: rgb(5, 99, 193); = text-decoration: underline;">[email protected]</a><span = style=3D"color: rgb(65, 86, 97);"></span></span><span style=3D"font-size: = 4pt;"><o:p></o:p></span></div><div style=3D"margin: 0in; font-size: = 11pt; font-family: Calibri, sans-serif;"><a href=3D"http://www.amsc.com/" = style=3D"color: rgb(5, 99, 193); text-decoration: underline;"><span = lang=3D"EN-GB" style=3D"color: blue;">amsc.com</span></a><span = style=3D"color: rgb(65, 86, 97);"></span><span = style=3D""><o:p></o:p></span></div><div style=3D"margin: 0in 0in 0in = 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;"><span = lang=3D"EN-GB" style=3D"font-size: 4pt;"> </span><span = style=3D"font-size: 4pt;"><o:p></o:p></span></div><div style=3D"margin: = 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span = style=3D"font-size: 9pt; color: rgb(65, 86, 97);"><span = id=3D"cid:[email protected]"><image001.jpg></span></spa= n></b><o:p></o:p></div><div style=3D"margin: 0in; font-size: 11pt; = font-family: Calibri, sans-serif;"><o:p> </o:p></div></div><span = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; = letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none; float: none; = display: inline !important;">"This e-mail message and any attachments = are confidential and may be privileged. If you are not the intended = recipient please notify AMSC immediately by replying to this message or = by sending a message to<span = class=3D"Apple-converted-space"> </span></span><a = href=3D"mailto:[email protected]" style=3D"color: rgb(5, 99, 193); = text-decoration: underline; font-family: Helvetica; font-size: 12px; = font-style: normal; font-variant-caps: normal; font-weight: 400; = letter-spacing: normal; orphans: auto; text-align: start; text-indent: = 0px; text-transform: none; white-space: normal; widows: auto; = word-spacing: 0px; -webkit-text-size-adjust: auto; = -webkit-text-stroke-width: 0px;">[email protected]</a><span = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; = letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none; float: none; = display: inline !important;"><span = class=3D"Apple-converted-space"> </span>and destroy all copies of = this message and any attachments. Thank = you."</span></div></blockquote></div><br></div></body></html>= --Apple-Mail=_D5F8EEDD-0AEE-4D47-8F7A-A263ACFE1550--